diff options
| author | Simon Riggs | 2012-12-07 13:26:52 +0000 |
|---|---|---|
| committer | Simon Riggs | 2012-12-07 13:26:52 +0000 |
| commit | 1f023f929702efc9fd4230267b0f0e8d72ba5067 (patch) | |
| tree | 04b1cfc1ad223ed4d6e334cde0a0c9ad14f40e84 /src/test/regress | |
| parent | 1eb6cee499d19fc9204e059ba37fc2dac32e2f25 (diff) | |
Optimize COPY FREEZE with CREATE TABLE also.
Jeff Davis, additional test by me
Diffstat (limited to 'src/test/regress')
| -rw-r--r-- | src/test/regress/expected/copy2.out | 12 | ||||
| -rw-r--r-- | src/test/regress/sql/copy2.sql | 8 |
2 files changed, 17 insertions, 3 deletions
diff --git a/src/test/regress/expected/copy2.out b/src/test/regress/expected/copy2.out index 7a9e546aad6..604c27a2f2f 100644 --- a/src/test/regress/expected/copy2.out +++ b/src/test/regress/expected/copy2.out @@ -254,7 +254,17 @@ SELECT * FROM testnull; | (4 rows) +BEGIN; CREATE TABLE vistest (LIKE testeoc); +COPY vistest FROM stdin CSV; +COMMIT; +SELECT xmax, * FROM vistest; + xmax | a +------+---- + 0 | a0 + 0 | b +(2 rows) + BEGIN; TRUNCATE vistest; COPY vistest FROM stdin CSV; @@ -324,14 +334,12 @@ SELECT * FROM vistest; COMMIT; TRUNCATE vistest; COPY vistest FROM stdin CSV FREEZE; -NOTICE: FREEZE option specified but pre-conditions not met BEGIN; INSERT INTO vistest VALUES ('z'); SAVEPOINT s1; TRUNCATE vistest; ROLLBACK TO SAVEPOINT s1; COPY vistest FROM stdin CSV FREEZE; -NOTICE: FREEZE option specified but pre-conditions not met SELECT * FROM vistest; a ---- diff --git a/src/test/regress/sql/copy2.sql b/src/test/regress/sql/copy2.sql index fbaa433be4e..55568e68e40 100644 --- a/src/test/regress/sql/copy2.sql +++ b/src/test/regress/sql/copy2.sql @@ -178,8 +178,14 @@ COPY testnull FROM stdin WITH NULL AS E'\\0'; SELECT * FROM testnull; - +BEGIN; CREATE TABLE vistest (LIKE testeoc); +COPY vistest FROM stdin CSV; +a0 +b +\. +COMMIT; +SELECT * FROM vistest; BEGIN; TRUNCATE vistest; COPY vistest FROM stdin CSV; |
