From bb2958bb3ac08eb69cbeb4d7cb1b9050054c8f62 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Fri, 8 Mar 2019 11:39:26 +0100 Subject: [PATCH v2 2/2] XXX Add test for bug #15631 --- src/test/regress/expected/temp.out | 4 ++++ src/test/regress/sql/temp.sql | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/src/test/regress/expected/temp.out b/src/test/regress/expected/temp.out index 056e5ecf33..9f37671e2b 100644 --- a/src/test/regress/expected/temp.out +++ b/src/test/regress/expected/temp.out @@ -111,6 +111,10 @@ SELECT * FROM temptest; ERROR: relation "temptest" does not exist LINE 1: SELECT * FROM temptest; ^ +-- bug #15631 +CREATE TEMP TABLE temptest (col int GENERATED ALWAYS AS IDENTITY) ON COMMIT DROP; +\c - +CREATE TEMP TABLE temptest0 (b varchar); -- ON COMMIT is only allowed for TEMP CREATE TABLE temptest(col int) ON COMMIT DELETE ROWS; ERROR: ON COMMIT can only be used on temporary tables diff --git a/src/test/regress/sql/temp.sql b/src/test/regress/sql/temp.sql index 17366a33a9..4efb7c840f 100644 --- a/src/test/regress/sql/temp.sql +++ b/src/test/regress/sql/temp.sql @@ -98,6 +98,11 @@ CREATE TEMP TABLE temptest(col) ON COMMIT DROP AS SELECT 1; SELECT * FROM temptest; +-- bug #15631 +CREATE TEMP TABLE temptest (col int GENERATED ALWAYS AS IDENTITY) ON COMMIT DROP; +\c - +CREATE TEMP TABLE temptest0 (b varchar); + -- ON COMMIT is only allowed for TEMP CREATE TABLE temptest(col int) ON COMMIT DELETE ROWS; -- 2.21.0