unstable.slt 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Copyright Materialize, Inc. and contributors. All rights reserved.
  2. #
  3. # Use of this software is governed by the Business Source License
  4. # included in the LICENSE file at the root of this repository.
  5. #
  6. # As of the Change Date specified in that file, in accordance with
  7. # the Business Source License, use of this software will be governed
  8. # by the Apache License, Version 2.0.
  9. mode cockroach
  10. # Objects in the mz_internal schema are unstable.
  11. statement error cannot create view with unstable dependencies
  12. CREATE VIEW v AS SELECT id, object_type, comment FROM mz_internal.mz_comments
  13. # Objects in the mz_introspection schema are unstable.
  14. statement error cannot create view with unstable dependencies
  15. CREATE VIEW v AS SELECT export_id, dataflow_id FROM mz_introspection.mz_compute_exports
  16. # Other system tables are stable.
  17. statement ok
  18. CREATE VIEW v AS SELECT id, oid, schema_id, name FROM mz_tables
  19. # SELECTs from unstable objects are allowed.
  20. statement ok
  21. SELECT id, object_type, comment FROM mz_internal.mz_comments
  22. # Test the compatibility mechanism that automatically translates reads from
  23. # `mz_internal` relations that have been moved out of that schema to their new
  24. # schemas.
  25. statement ok
  26. SET cluster_replica = r1
  27. statement ok
  28. SELECT * FROM mz_internal.mz_compute_exports
  29. statement ok
  30. SET search_path = mz_internal
  31. statement ok
  32. SELECT * FROM mz_compute_exports
  33. statement ok
  34. RESET search_path