populate-tables.td 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. $ postgres-execute connection=postgres://postgres:postgres@postgres
  10. DROP TABLE IF EXISTS ten;
  11. CREATE TABLE ten (f1 INTEGER);
  12. ALTER TABLE ten REPLICA IDENTITY FULL;
  13. INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
  14. DROP TABLE IF EXISTS t0;
  15. CREATE TABLE t0 (f1 INTEGER, f2 TEXT);
  16. ALTER TABLE t0 REPLICA IDENTITY FULL;
  17. DROP TABLE IF EXISTS t1;
  18. CREATE TABLE t1 (f1 INTEGER, f2 TEXT);
  19. ALTER TABLE t1 REPLICA IDENTITY FULL;
  20. INSERT INTO t1 SELECT a1.f1 + a6.f1 , E'abc\nxyz' FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6;
  21. DROP TABLE IF EXISTS t2;
  22. CREATE TABLE t2 (f1 INTEGER, f2 TEXT);
  23. ALTER TABLE t2 REPLICA IDENTITY FULL;
  24. INSERT INTO t2 SELECT a1.f1 + a6.f1 , E'abc\nxyz' FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6;
  25. DROP TABLE IF EXISTS alter_fail_drop_col;
  26. CREATE TABLE alter_fail_drop_col (f1 INTEGER, f2 INTEGER);
  27. ALTER TABLE alter_fail_drop_col REPLICA IDENTITY FULL;
  28. INSERT INTO alter_fail_drop_col VALUES (1, 1);
  29. DROP TABLE IF EXISTS alter_fail_drop_constraint;
  30. CREATE TABLE alter_fail_drop_constraint (f1 INTEGER NOT NULL);
  31. ALTER TABLE alter_fail_drop_constraint REPLICA IDENTITY FULL;
  32. INSERT INTO alter_fail_drop_constraint VALUES (1);