Commit 5df3fc67 authored by Neil Conway's avatar Neil Conway

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.
parent fa471dac
...@@ -318,7 +318,7 @@ drop table atacc3; ...@@ -318,7 +318,7 @@ drop table atacc3;
drop table atacc2; drop table atacc2;
drop table atacc1; drop table atacc1;
-- test unique constraint adding -- test unique constraint adding
create table atacc1 ( test int ); create table atacc1 ( test int ) with oids;
-- add a unique constraint -- add a unique constraint
alter table atacc1 add constraint atacc_test1 unique (test); alter table atacc1 add constraint atacc_test1 unique (test);
NOTICE: ALTER TABLE / ADD UNIQUE will create implicit index "atacc_test1" for table "atacc1" 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); ...@@ -378,7 +378,7 @@ insert into atacc1 (test2, test) values (2, 3);
ERROR: duplicate key violates unique constraint "atacc1_test_key" ERROR: duplicate key violates unique constraint "atacc1_test_key"
drop table atacc1; drop table atacc1;
-- test primary key constraint adding -- test primary key constraint adding
create table atacc1 ( test int ); create table atacc1 ( test int ) with oids;
-- add a primary key constraint -- add a primary key constraint
alter table atacc1 add constraint atacc_test1 primary key (test); 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" 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; ...@@ -476,7 +476,7 @@ alter table non_existent alter column bar drop not null;
ERROR: relation "non_existent" does not exist ERROR: relation "non_existent" does not exist
-- test setting columns to null and not null and vice versa -- test setting columns to null and not null and vice versa
-- test checking for null values and primary key -- 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 add constraint "atacc1_pkey" primary key (test);
NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index "atacc1_pkey" for table "atacc1" NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index "atacc1_pkey" for table "atacc1"
alter table atacc1 alter column test drop not null; alter table atacc1 alter column test drop not null;
...@@ -598,7 +598,7 @@ ERROR: permission denied: "pg_class" is a system catalog ...@@ -598,7 +598,7 @@ ERROR: permission denied: "pg_class" is a system catalog
alter table nosuchtable drop column bar; alter table nosuchtable drop column bar;
ERROR: relation "nosuchtable" does not exist ERROR: relation "nosuchtable" does not exist
-- test dropping columns -- 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); insert into atacc1 values (1, 2, 3, 4);
alter table atacc1 drop a; alter table atacc1 drop a;
alter table atacc1 drop a; alter table atacc1 drop a;
......
...@@ -4,7 +4,7 @@ CREATE TABLE x ( ...@@ -4,7 +4,7 @@ CREATE TABLE x (
c text not null default 'stuff', c text not null default 'stuff',
d text, d text,
e text e text
); ) WITH OIDS;
NOTICE: CREATE TABLE will create implicit sequence "x_a_seq" for serial column "x.a" NOTICE: CREATE TABLE will create implicit sequence "x_a_seq" for serial column "x.a"
CREATE FUNCTION fn_x_before () RETURNS TRIGGER AS ' CREATE FUNCTION fn_x_before () RETURNS TRIGGER AS '
BEGIN BEGIN
......
...@@ -47,7 +47,7 @@ CREATE TABLE tenk1 ( ...@@ -47,7 +47,7 @@ CREATE TABLE tenk1 (
stringu1 name, stringu1 name,
stringu2 name, stringu2 name,
string4 name string4 name
); ) WITH OIDS;
CREATE TABLE tenk2 ( CREATE TABLE tenk2 (
unique1 int4, unique1 int4,
unique2 int4, unique2 int4,
...@@ -74,7 +74,7 @@ CREATE TABLE person ( ...@@ -74,7 +74,7 @@ CREATE TABLE person (
CREATE TABLE emp ( CREATE TABLE emp (
salary int4, salary int4,
manager name manager name
) INHERITS (person); ) INHERITS (person) WITH OIDS;
CREATE TABLE student ( CREATE TABLE student (
gpa float8 gpa float8
) INHERITS (person); ) INHERITS (person);
......
...@@ -11,9 +11,6 @@ select 1; ...@@ -11,9 +11,6 @@ select 1;
-- --
-- UNSUPPORTED STUFF -- UNSUPPORTED STUFF
-- doesn't work
-- attachas nonesuch
--
-- doesn't work -- doesn't work
-- notify pg_class -- notify pg_class
-- --
......
...@@ -348,7 +348,7 @@ drop table atacc1; ...@@ -348,7 +348,7 @@ drop table atacc1;
-- test unique constraint adding -- test unique constraint adding
create table atacc1 ( test int ); create table atacc1 ( test int ) with oids;
-- add a unique constraint -- add a unique constraint
alter table atacc1 add constraint atacc_test1 unique (test); alter table atacc1 add constraint atacc_test1 unique (test);
-- insert first value -- insert first value
...@@ -402,7 +402,7 @@ drop table atacc1; ...@@ -402,7 +402,7 @@ drop table atacc1;
-- test primary key constraint adding -- test primary key constraint adding
create table atacc1 ( test int ); create table atacc1 ( test int ) with oids;
-- add a primary key constraint -- add a primary key constraint
alter table atacc1 add constraint atacc_test1 primary key (test); alter table atacc1 add constraint atacc_test1 primary key (test);
-- insert first value -- insert first value
...@@ -485,7 +485,7 @@ alter table non_existent alter column bar drop not null; ...@@ -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 setting columns to null and not null and vice versa
-- test checking for null values and primary key -- 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 add constraint "atacc1_pkey" primary key (test);
alter table atacc1 alter column test drop not null; alter table atacc1 alter column test drop not null;
alter table atacc1 drop constraint "atacc1_pkey"; alter table atacc1 drop constraint "atacc1_pkey";
...@@ -582,7 +582,7 @@ alter table pg_class drop column relname; ...@@ -582,7 +582,7 @@ alter table pg_class drop column relname;
alter table nosuchtable drop column bar; alter table nosuchtable drop column bar;
-- test dropping columns -- 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); insert into atacc1 values (1, 2, 3, 4);
alter table atacc1 drop a; alter table atacc1 drop a;
alter table atacc1 drop a; alter table atacc1 drop a;
......
...@@ -4,7 +4,7 @@ CREATE TABLE x ( ...@@ -4,7 +4,7 @@ CREATE TABLE x (
c text not null default 'stuff', c text not null default 'stuff',
d text, d text,
e text e text
); ) WITH OIDS;
CREATE FUNCTION fn_x_before () RETURNS TRIGGER AS ' CREATE FUNCTION fn_x_before () RETURNS TRIGGER AS '
BEGIN BEGIN
......
...@@ -51,7 +51,7 @@ CREATE TABLE tenk1 ( ...@@ -51,7 +51,7 @@ CREATE TABLE tenk1 (
stringu1 name, stringu1 name,
stringu2 name, stringu2 name,
string4 name string4 name
); ) WITH OIDS;
CREATE TABLE tenk2 ( CREATE TABLE tenk2 (
unique1 int4, unique1 int4,
...@@ -83,7 +83,7 @@ CREATE TABLE person ( ...@@ -83,7 +83,7 @@ CREATE TABLE person (
CREATE TABLE emp ( CREATE TABLE emp (
salary int4, salary int4,
manager name manager name
) INHERITS (person); ) INHERITS (person) WITH OIDS;
CREATE TABLE student ( CREATE TABLE student (
......
...@@ -9,9 +9,6 @@ select 1; ...@@ -9,9 +9,6 @@ select 1;
-- --
-- UNSUPPORTED STUFF -- UNSUPPORTED STUFF
-- doesn't work
-- attachas nonesuch
--
-- doesn't work -- doesn't work
-- notify pg_class -- notify pg_class
-- --
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment