drop.td 1.1 KB

123456789101112131415161718192021222324
  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. # Test DROP ... CASCADE statements with multiple items
  10. # From https://github.com/MaterializeInc/database-issues/issues/1647
  11. > CREATE TABLE t1 (f1 INTEGER)
  12. > CREATE TABLE t2 (f2 INTEGER)
  13. > CREATE MATERIALIZED VIEW v1 AS SELECT * FROM t1, t2
  14. > DROP TABLE t1, t2 CASCADE
  15. # Test CREATE OR REPLACE statement that attempts to depend
  16. # on the object that is being replaced
  17. # https://github.com/MaterializeInc/database-issues/issues/1626
  18. > CREATE VIEW v2 AS SELECT 1
  19. ! CREATE OR REPLACE VIEW v2 AS SELECT * FROM v2
  20. contains:cannot replace view materialize.public.v2: depended upon by new materialize.public.v2 definition
  21. ! CREATE OR REPLACE MATERIALIZED VIEW v2 AS SELECT * FROM v2
  22. contains:v2 is a view not a materialized view