summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Conway <neilc@samurai.com>2005-01-22 05:14:26 +0000
committerNeil Conway <neilc@samurai.com>2005-01-22 05:14:26 +0000
commit9fec27344eb73cb72043f4411c9ac4375d958257 (patch)
tree67e30121be81e1d441f40fe7338535897fac430e
parentde49759a0e28657db53a1e1c8425ea72632dac95 (diff)
downloadpostgresql-9fec27344eb73cb72043f4411c9ac4375d958257.tar.gz
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.
-rw-r--r--src/test/regress/expected/alter_table.out8
-rw-r--r--src/test/regress/expected/copy2.out2
-rw-r--r--src/test/regress/expected/create_table.out4
-rw-r--r--src/test/regress/expected/errors.out3
-rw-r--r--src/test/regress/sql/alter_table.sql8
-rw-r--r--src/test/regress/sql/copy2.sql2
-rw-r--r--src/test/regress/sql/create_table.sql4
-rw-r--r--src/test/regress/sql/errors.sql3
8 files changed, 14 insertions, 20 deletions
diff --git a/src/test/regress/expected/alter_table.out b/src/test/regress/expected/alter_table.out
index 787340ddb5..fbb23a4b12 100644
--- a/src/test/regress/expected/alter_table.out
+++ b/src/test/regress/expected/alter_table.out
@@ -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;
diff --git a/src/test/regress/expected/copy2.out b/src/test/regress/expected/copy2.out
index f3da7e85c6..6a4769adac 100644
--- a/src/test/regress/expected/copy2.out
+++ b/src/test/regress/expected/copy2.out
@@ -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
diff --git a/src/test/regress/expected/create_table.out b/src/test/regress/expected/create_table.out
index 0da19d757d..448be93519 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);
+) INHERITS (person) WITH OIDS;
CREATE TABLE student (
gpa float8
) INHERITS (person);
diff --git a/src/test/regress/expected/errors.out b/src/test/regress/expected/errors.out
index 8eca045ee7..3e3a773337 100644
--- a/src/test/regress/expected/errors.out
+++ b/src/test/regress/expected/errors.out
@@ -12,9 +12,6 @@ select 1;
-- UNSUPPORTED STUFF
-- doesn't work
--- attachas nonesuch
---
--- doesn't work
-- notify pg_class
--
--
diff --git a/src/test/regress/sql/alter_table.sql b/src/test/regress/sql/alter_table.sql
index 6b94e14ec8..e6be119ff7 100644
--- a/src/test/regress/sql/alter_table.sql
+++ b/src/test/regress/sql/alter_table.sql
@@ -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;
diff --git a/src/test/regress/sql/copy2.sql b/src/test/regress/sql/copy2.sql
index 70c8ea6b1e..78bbf4182e 100644
--- a/src/test/regress/sql/copy2.sql
+++ b/src/test/regress/sql/copy2.sql
@@ -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
diff --git a/src/test/regress/sql/create_table.sql b/src/test/regress/sql/create_table.sql
index b6a0a8fe60..b5a2889f37 100644
--- a/src/test/regress/sql/create_table.sql
+++ b/src/test/regress/sql/create_table.sql
@@ -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 (
diff --git a/src/test/regress/sql/errors.sql b/src/test/regress/sql/errors.sql
index 630e49024d..5ccd13bbe5 100644
--- a/src/test/regress/sql/errors.sql
+++ b/src/test/regress/sql/errors.sql
@@ -10,9 +10,6 @@ select 1;
-- UNSUPPORTED STUFF
-- doesn't work
--- attachas nonesuch
---
--- doesn't work
-- notify pg_class
--