summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorHeikki Linnakangas2011-05-21 12:18:00 +0000
committerHeikki Linnakangas2011-05-21 12:24:34 +0000
commit27c7875d95cf629e3f344ba91d1f8a1a936ed043 (patch)
treeb0a4ebfb07433aab60222de5d37dd61d60d6a0ee /src/test
parentbcf63a51e3dbf7cdb70af03ed13e6984dee41ec0 (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.out6
-rw-r--r--src/test/regress/sql/alter_table.sql7
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;