concurrent-ddl.td 974 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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 concurrent DDL transactions
  10. > CREATE TABLE foo (a INT)
  11. > INSERT INTO foo VALUES (42)
  12. > BEGIN
  13. > SELECT * FROM foo
  14. 42
  15. $ postgres-connect name=ddl url=postgres://materialize:materialize@${testdrive.materialize-sql-addr}
  16. $ postgres-execute connection=ddl
  17. DROP TABLE foo
  18. ! SELECT * FROM foo
  19. contains:unknown catalog item 'foo'
  20. > ROLLBACK
  21. > CREATE TABLE foo (a INT)
  22. > INSERT INTO foo VALUES (42)
  23. > BEGIN
  24. > SELECT * FROM foo
  25. 42
  26. $ postgres-connect name=ddl url=postgres://materialize:materialize@${testdrive.materialize-sql-addr}
  27. $ postgres-execute connection=ddl
  28. DROP TABLE foo
  29. > COMMIT