| -- |
| -- Transactions (GPDB-specific tests) |
| -- |
| |
| CREATE TEMPORARY TABLE temptest (a int); |
| INSERT INTO temptest VALUES (generate_series(1, 10)); |
| |
| CREATE TEMPORARY SEQUENCE tempseq; |
| |
| SET SESSION CHARACTERISTICS AS TRANSACTION READ ONLY; |
| |
| -- Make sure COPY works with temp tables during a READ ONLY transaction. |
| COPY temptest TO '@abs_builddir@/results/xacttemp.data'; |
| DELETE FROM temptest; |
| COPY temptest FROM '@abs_builddir@/results/xacttemp.data'; |
| SELECT * from temptest; |
| |
| -- Ensure temporary sequences function correctly as well. |
| SELECT nextval('tempseq'); |
| SELECT setval('tempseq', 5); |
| SELECT nextval('tempseq'); |