mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-18 18:44:06 +08:00
This patch updates the regression tests to allow "make installcheck" to
pass if "default_with_oids" is set to false. I took the approach of explicitly adding WITH OIDS to the CREATE TABLEs where necessary, rather than tweaking the default_with_oids GUC var.
This commit is contained in:
parent
de49759a0e
commit
9fec27344e
@ -318,7 +318,7 @@ drop table atacc3;
|
||||
drop table atacc2;
|
||||
drop table atacc1;
|
||||
-- test unique constraint adding
|
||||
create table atacc1 ( test int );
|
||||
create table atacc1 ( test int ) with oids;
|
||||
-- add a unique constraint
|
||||
alter table atacc1 add constraint atacc_test1 unique (test);
|
||||
NOTICE: ALTER TABLE / ADD UNIQUE will create implicit index "atacc_test1" for table "atacc1"
|
||||
@ -378,7 +378,7 @@ insert into atacc1 (test2, test) values (2, 3);
|
||||
ERROR: duplicate key violates unique constraint "atacc1_test_key"
|
||||
drop table atacc1;
|
||||
-- test primary key constraint adding
|
||||
create table atacc1 ( test int );
|
||||
create table atacc1 ( test int ) with oids;
|
||||
-- add a primary key constraint
|
||||
alter table atacc1 add constraint atacc_test1 primary key (test);
|
||||
NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index "atacc_test1" for table "atacc1"
|
||||
@ -476,7 +476,7 @@ alter table non_existent alter column bar drop not null;
|
||||
ERROR: relation "non_existent" does not exist
|
||||
-- test setting columns to null and not null and vice versa
|
||||
-- test checking for null values and primary key
|
||||
create table atacc1 (test int not null);
|
||||
create table atacc1 (test int not null) with oids;
|
||||
alter table atacc1 add constraint "atacc1_pkey" primary key (test);
|
||||
NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index "atacc1_pkey" for table "atacc1"
|
||||
alter table atacc1 alter column test drop not null;
|
||||
@ -598,7 +598,7 @@ ERROR: permission denied: "pg_class" is a system catalog
|
||||
alter table nosuchtable drop column bar;
|
||||
ERROR: relation "nosuchtable" does not exist
|
||||
-- test dropping columns
|
||||
create table atacc1 (a int4 not null, b int4, c int4 not null, d int4);
|
||||
create table atacc1 (a int4 not null, b int4, c int4 not null, d int4) with oids;
|
||||
insert into atacc1 values (1, 2, 3, 4);
|
||||
alter table atacc1 drop a;
|
||||
alter table atacc1 drop a;
|
||||
|
@ -4,7 +4,7 @@ CREATE TABLE x (
|
||||
c text not null default 'stuff',
|
||||
d text,
|
||||
e text
|
||||
);
|
||||
) WITH OIDS;
|
||||
NOTICE: CREATE TABLE will create implicit sequence "x_a_seq" for serial column "x.a"
|
||||
CREATE FUNCTION fn_x_before () RETURNS TRIGGER AS '
|
||||
BEGIN
|
||||
|
@ -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);
|
||||
) INHERITS (person) WITH OIDS;
|
||||
CREATE TABLE student (
|
||||
gpa float8
|
||||
) INHERITS (person);
|
||||
|
@ -11,9 +11,6 @@ select 1;
|
||||
--
|
||||
-- UNSUPPORTED STUFF
|
||||
|
||||
-- doesn't work
|
||||
-- attachas nonesuch
|
||||
--
|
||||
-- doesn't work
|
||||
-- notify pg_class
|
||||
--
|
||||
|
@ -348,7 +348,7 @@ drop table atacc1;
|
||||
|
||||
-- test unique constraint adding
|
||||
|
||||
create table atacc1 ( test int );
|
||||
create table atacc1 ( test int ) with oids;
|
||||
-- add a unique constraint
|
||||
alter table atacc1 add constraint atacc_test1 unique (test);
|
||||
-- insert first value
|
||||
@ -402,7 +402,7 @@ drop table atacc1;
|
||||
|
||||
-- test primary key constraint adding
|
||||
|
||||
create table atacc1 ( test int );
|
||||
create table atacc1 ( test int ) with oids;
|
||||
-- add a primary key constraint
|
||||
alter table atacc1 add constraint atacc_test1 primary key (test);
|
||||
-- insert first value
|
||||
@ -485,7 +485,7 @@ alter table non_existent alter column bar drop not null;
|
||||
|
||||
-- test setting columns to null and not null and vice versa
|
||||
-- test checking for null values and primary key
|
||||
create table atacc1 (test int not null);
|
||||
create table atacc1 (test int not null) with oids;
|
||||
alter table atacc1 add constraint "atacc1_pkey" primary key (test);
|
||||
alter table atacc1 alter column test drop not null;
|
||||
alter table atacc1 drop constraint "atacc1_pkey";
|
||||
@ -582,7 +582,7 @@ alter table pg_class drop column relname;
|
||||
alter table nosuchtable drop column bar;
|
||||
|
||||
-- test dropping columns
|
||||
create table atacc1 (a int4 not null, b int4, c int4 not null, d int4);
|
||||
create table atacc1 (a int4 not null, b int4, c int4 not null, d int4) with oids;
|
||||
insert into atacc1 values (1, 2, 3, 4);
|
||||
alter table atacc1 drop a;
|
||||
alter table atacc1 drop a;
|
||||
|
@ -4,7 +4,7 @@ CREATE TABLE x (
|
||||
c text not null default 'stuff',
|
||||
d text,
|
||||
e text
|
||||
);
|
||||
) WITH OIDS;
|
||||
|
||||
CREATE FUNCTION fn_x_before () RETURNS TRIGGER AS '
|
||||
BEGIN
|
||||
|
@ -51,7 +51,7 @@ CREATE TABLE tenk1 (
|
||||
stringu1 name,
|
||||
stringu2 name,
|
||||
string4 name
|
||||
);
|
||||
) WITH OIDS;
|
||||
|
||||
CREATE TABLE tenk2 (
|
||||
unique1 int4,
|
||||
@ -83,7 +83,7 @@ CREATE TABLE person (
|
||||
CREATE TABLE emp (
|
||||
salary int4,
|
||||
manager name
|
||||
) INHERITS (person);
|
||||
) INHERITS (person) WITH OIDS;
|
||||
|
||||
|
||||
CREATE TABLE student (
|
||||
|
@ -9,9 +9,6 @@ select 1;
|
||||
--
|
||||
-- UNSUPPORTED STUFF
|
||||
|
||||
-- doesn't work
|
||||
-- attachas nonesuch
|
||||
--
|
||||
-- doesn't work
|
||||
-- notify pg_class
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user