github-2514.td 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. > CREATE TABLE t1 (f1 INTEGER, f2 INTEGER);
  10. > CREATE INDEX i1 ON t1 (f2);
  11. > CREATE VIEW v1 AS SELECT * FROM t1;
  12. $ postgres-connect name=conn1 url=postgres://materialize:materialize@${testdrive.materialize-sql-addr}
  13. $ postgres-connect name=conn2 url=postgres://materialize:materialize@${testdrive.materialize-sql-addr}
  14. $ postgres-execute connection=conn1
  15. BEGIN;
  16. SELECT * FROM v1;
  17. $ postgres-execute connection=conn2
  18. BEGIN;
  19. SELECT * FROM v1;
  20. $ postgres-execute connection=conn1
  21. SELECT * FROM v1;
  22. $ postgres-execute connection=conn2
  23. SELECT * FROM v1;
  24. $ postgres-execute connection=conn1
  25. SELECT * FROM v1;
  26. $ postgres-execute connection=conn2
  27. SELECT * FROM v1;
  28. $ postgres-execute connection=conn1
  29. SELECT * FROM v1;
  30. $ postgres-execute connection=conn2
  31. SELECT * FROM v1;