ambiguous_rename.slt 866 B

12345678910111213141516171819202122232425262728
  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. statement ok
  11. CREATE DATABASE d1
  12. statement ok
  13. CREATE DATABASE d2
  14. statement ok
  15. CREATE TABLE d1.public.foo(a int)
  16. statement ok
  17. CREATE TABLE d2.public.bar(b int)
  18. statement ok
  19. CREATE VIEW v AS SELECT foo.a, bar.b FROM d1.public.foo, d2.public.bar
  20. statement error renaming conflict: in materialize.public.v, which uses d1.public.foo, found reference to "bar"; cannot rename "foo" to any identity used in any existing view definitions
  21. ALTER TABLE d1.public.foo RENAME TO bar