diff options
author | Heikki Linnakangas | 2011-05-21 12:18:00 +0000 |
---|---|---|
committer | Heikki Linnakangas | 2011-05-21 12:24:34 +0000 |
commit | 27c7875d95cf629e3f344ba91d1f8a1a936ed043 (patch) | |
tree | b0a4ebfb07433aab60222de5d37dd61d60d6a0ee /src/test | |
parent | bcf63a51e3dbf7cdb70af03ed13e6984dee41ec0 (diff) |
In binary-upgrade mode, dump dropped attributes of composite types.
Noah Misch
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/regress/expected/alter_table.out | 6 | ||||
-rw-r--r-- | src/test/regress/sql/alter_table.sql | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/test/regress/expected/alter_table.out b/src/test/regress/expected/alter_table.out index a6fb36e2d97..26e7bfd8c2f 100644 --- a/src/test/regress/expected/alter_table.out +++ b/src/test/regress/expected/alter_table.out @@ -1955,6 +1955,12 @@ Table "public.test_tbl2_subclass" Inherits: test_tbl2 DROP TABLE test_tbl2_subclass; +-- This test isn't that interesting on its own, but the purpose is to leave +-- behind a table to test pg_upgrade with. The table has a composite type +-- column in it, and the composite type has a dropped attribute. +CREATE TYPE test_type3 AS (a int); +CREATE TABLE test_tbl3 (c) AS SELECT '(1)'::test_type3; +ALTER TYPE test_type3 DROP ATTRIBUTE a, ADD ATTRIBUTE b int; CREATE TYPE test_type_empty AS (); DROP TYPE test_type_empty; -- diff --git a/src/test/regress/sql/alter_table.sql b/src/test/regress/sql/alter_table.sql index 4b2afe8bc93..0ed16fb7cf9 100644 --- a/src/test/regress/sql/alter_table.sql +++ b/src/test/regress/sql/alter_table.sql @@ -1371,6 +1371,13 @@ ALTER TYPE test_type2 RENAME ATTRIBUTE a TO aa CASCADE; DROP TABLE test_tbl2_subclass; +-- This test isn't that interesting on its own, but the purpose is to leave +-- behind a table to test pg_upgrade with. The table has a composite type +-- column in it, and the composite type has a dropped attribute. +CREATE TYPE test_type3 AS (a int); +CREATE TABLE test_tbl3 (c) AS SELECT '(1)'::test_type3; +ALTER TYPE test_type3 DROP ATTRIBUTE a, ADD ATTRIBUTE b int; + CREATE TYPE test_type_empty AS (); DROP TYPE test_type_empty; |