diff options
Diffstat (limited to 'src/test/regress/expected/create_table.out')
-rw-r--r-- | src/test/regress/expected/create_table.out | 44 |
1 files changed, 14 insertions, 30 deletions
diff --git a/src/test/regress/expected/create_table.out b/src/test/regress/expected/create_table.out index f474f0d73e1..e92748c1ea0 100644 --- a/src/test/regress/expected/create_table.out +++ b/src/test/regress/expected/create_table.out @@ -47,7 +47,7 @@ CREATE TABLE tenk1 ( stringu1 name, stringu2 name, string4 name -) WITH OIDS; +); CREATE TABLE tenk2 ( unique1 int4, unique2 int4, @@ -74,7 +74,7 @@ CREATE TABLE person ( CREATE TABLE emp ( salary int4, manager name -) INHERITS (person) WITH OIDS; +) INHERITS (person); CREATE TABLE student ( gpa float8 ) INHERITS (person); @@ -218,8 +218,6 @@ NOTICE: relation "test_tsvector" already exists, skipping -- invalid: non-lowercase quoted reloptions identifiers CREATE TABLE tas_case WITH ("Fillfactor" = 10) AS SELECT 1 a; ERROR: unrecognized parameter "Fillfactor" -CREATE TABLE tas_case (a text) WITH ("Oids" = true); -ERROR: unrecognized parameter "Oids" CREATE UNLOGGED TABLE unlogged1 (a int primary key); -- OK CREATE TEMPORARY TABLE unlogged2 (a int primary key); -- OK SELECT relname, relkind, relpersistence FROM pg_class WHERE relname ~ '^unlogged\d' ORDER BY relname; @@ -263,9 +261,18 @@ ERROR: relation "as_select1" already exists CREATE TABLE IF NOT EXISTS as_select1 AS SELECT * FROM pg_class WHERE relkind = 'r'; NOTICE: relation "as_select1" already exists, skipping DROP TABLE as_select1; --- check that the oid column is added before the primary key is checked -CREATE TABLE oid_pk (f1 INT, PRIMARY KEY(oid)) WITH OIDS; -DROP TABLE oid_pk; +-- check that tables with oids cannot be created anymore +CREATE TABLE withoid() WITH OIDS; +ERROR: syntax error at or near "OIDS" +LINE 1: CREATE TABLE withoid() WITH OIDS; + ^ +CREATE TABLE withoid() WITH (oids); +ERROR: tables declared WITH OIDS are not supported +CREATE TABLE withoid() WITH (oids = true); +ERROR: tables declared WITH OIDS are not supported +-- but explicitly not adding oids is still supported +CREATE TEMP TABLE withoutoid() WITHOUT OIDS; DROP TABLE withoutoid; +CREATE TEMP TABLE withoutoid() WITH (oids = false); DROP TABLE withoutoid; -- -- Partitioned tables -- @@ -575,29 +582,6 @@ CREATE TEMP TABLE temp_parted ( CREATE TABLE fail_part PARTITION OF temp_parted FOR VALUES IN ('a'); ERROR: cannot create a permanent relation as partition of temporary relation "temp_parted" DROP TABLE temp_parted; --- cannot create a table with oids as partition of table without oids -CREATE TABLE no_oids_parted ( - a int -) PARTITION BY RANGE (a) WITHOUT OIDS; -CREATE TABLE fail_part PARTITION OF no_oids_parted FOR VALUES FROM (1) TO (10) WITH OIDS; -ERROR: cannot create table with OIDs as partition of table without OIDs -DROP TABLE no_oids_parted; --- If the partitioned table has oids, then the partition must have them. --- If the WITHOUT OIDS option is specified for partition, it is overridden. -CREATE TABLE oids_parted ( - a int -) PARTITION BY RANGE (a) WITH OIDS; -CREATE TABLE part_forced_oids PARTITION OF oids_parted FOR VALUES FROM (1) TO (10) WITHOUT OIDS; -\d+ part_forced_oids - Table "public.part_forced_oids" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+---------+-----------+----------+---------+---------+--------------+------------- - a | integer | | | | plain | | -Partition of: oids_parted FOR VALUES FROM (1) TO (10) -Partition constraint: ((a IS NOT NULL) AND (a >= 1) AND (a < 10)) -Has OIDs: yes - -DROP TABLE oids_parted, part_forced_oids; -- check for partition bound overlap and other invalid specifications CREATE TABLE list_parted2 ( a varchar |