diff options
| author | Neil Conway <neilc@samurai.com> | 2006-02-19 00:04:28 +0000 |
|---|---|---|
| committer | Neil Conway <neilc@samurai.com> | 2006-02-19 00:04:28 +0000 |
| commit | 85c0eac1afd92201638a4af6ab6e936f47727551 (patch) | |
| tree | 6c090e8b4ffa4535abaf5eb61265e4df2d6add10 /src/test/regress/sql/temp.sql | |
| parent | 8c5dfbabffa7709bb7ee2ab97a9f230bc37f8c8d (diff) | |
| download | postgresql-85c0eac1afd92201638a4af6ab6e936f47727551.tar.gz | |
Add TABLESPACE and ON COMMIT clauses to CREATE TABLE AS. ON COMMIT is
required by the SQL standard, and TABLESPACE is useful functionality.
Patch from Kris Jurka, minor editorialization by Neil Conway.
Diffstat (limited to 'src/test/regress/sql/temp.sql')
| -rw-r--r-- | src/test/regress/sql/temp.sql | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/regress/sql/temp.sql b/src/test/regress/sql/temp.sql index 972d511ab7..6a4b856144 100644 --- a/src/test/regress/sql/temp.sql +++ b/src/test/regress/sql/temp.sql @@ -66,6 +66,16 @@ SELECT * FROM temptest; DROP TABLE temptest; +BEGIN; +CREATE TEMP TABLE temptest(col) ON COMMIT DELETE ROWS AS SELECT 1; + +SELECT * FROM temptest; +COMMIT; + +SELECT * FROM temptest; + +DROP TABLE temptest; + -- Test ON COMMIT DROP BEGIN; @@ -80,9 +90,18 @@ COMMIT; SELECT * FROM temptest; +BEGIN; +CREATE TEMP TABLE temptest(col) ON COMMIT DROP AS SELECT 1; + +SELECT * FROM temptest; +COMMIT; + +SELECT * FROM temptest; + -- ON COMMIT is only allowed for TEMP CREATE TABLE temptest(col int) ON COMMIT DELETE ROWS; +CREATE TABLE temptest(col) ON COMMIT DELETE ROWS AS SELECT 1; -- Test foreign keys BEGIN; |
