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.
Barring any objections, I intend to apply this to HEAD and REL8_0_STABLE
today or tomorrow.
-Neil
Index: src/test/regress/expected/alter_table.out
===================================================================
RCS file: /var/lib/cvs/pgsql/src/test/regress/expected/alter_table.out,v
retrieving revision 1.85
diff -c -r1.85 alter_table.out
*** src/test/regress/expected/alter_table.out 28 Aug 2004 22:06:04 -0000 1.85
--- src/test/regress/expected/alter_table.out 21 Jan 2005 01:03:57 -0000
***************
*** 318,324 ****
drop table atacc2;
drop table atacc1;
-- test unique constraint adding
! create table atacc1 ( test int );
-- 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"
--- 318,324 ----
drop table atacc2;
drop table atacc1;
-- test unique constraint adding
! 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,384 ****
ERROR: duplicate key violates unique constraint "atacc1_test_key"
drop table atacc1;
-- test primary key constraint adding
! create table atacc1 ( test int );
-- 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"
--- 378,384 ----
ERROR: duplicate key violates unique constraint "atacc1_test_key"
drop table atacc1;
-- test primary key constraint adding
! 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,482 ****
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);
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;
--- 476,482 ----
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) 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,604 ****
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);
insert into atacc1 values (1, 2, 3, 4);
alter table atacc1 drop a;
alter table atacc1 drop a;
--- 598,604 ----
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) with oids;
insert into atacc1 values (1, 2, 3, 4);
alter table atacc1 drop a;
alter table atacc1 drop a;
Index: src/test/regress/expected/copy2.out
===================================================================
RCS file: /var/lib/cvs/pgsql/src/test/regress/expected/copy2.out,v
retrieving revision 1.19
diff -c -r1.19 copy2.out
*** src/test/regress/expected/copy2.out 10 Jun 2004 17:56:01 -0000 1.19
--- src/test/regress/expected/copy2.out 21 Jan 2005 00:54:10 -0000
***************
*** 4,10 ****
c text not null default 'stuff',
d text,
e text
! );
NOTICE: CREATE TABLE will create implicit sequence "x_a_seq" for serial column "x.a"
CREATE FUNCTION fn_x_before () RETURNS TRIGGER AS '
BEGIN
--- 4,10 ----
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
Index: src/test/regress/expected/create_table.out
===================================================================
RCS file: /var/lib/cvs/pgsql/src/test/regress/expected/create_table.out,v
retrieving revision 1.12
diff -c -r1.12 create_table.out
*** src/test/regress/expected/create_table.out 25 Sep 2003 06:58:06 -0000 1.12
--- src/test/regress/expected/create_table.out 21 Jan 2005 00:57:09 -0000
***************
*** 47,53 ****
stringu1 name,
stringu2 name,
string4 name
! );
CREATE TABLE tenk2 (
unique1 int4,
unique2 int4,
--- 47,53 ----
stringu1 name,
stringu2 name,
string4 name
! ) WITH OIDS;
CREATE TABLE tenk2 (
unique1 int4,
unique2 int4,
***************
*** 74,80 ****
CREATE TABLE emp (
salary int4,
manager name
! ) INHERITS (person);
CREATE TABLE student (
gpa float8
) INHERITS (person);
--- 74,80 ----
CREATE TABLE emp (
salary int4,
manager name
! ) INHERITS (person) WITH OIDS;
CREATE TABLE student (
gpa float8
) INHERITS (person);
Index: src/test/regress/expected/errors.out
===================================================================
RCS file: /var/lib/cvs/pgsql/src/test/regress/expected/errors.out,v
retrieving revision 1.48
diff -c -r1.48 errors.out
*** src/test/regress/expected/errors.out 14 Mar 2004 04:25:17 -0000 1.48
--- src/test/regress/expected/errors.out 21 Jan 2005 00:53:46 -0000
***************
*** 12,20 ****
-- UNSUPPORTED STUFF
-- doesn't work
- -- attachas nonesuch
- --
- -- doesn't work
-- notify pg_class
--
--
--- 12,17 ----
Index: src/test/regress/sql/alter_table.sql
===================================================================
RCS file: /var/lib/cvs/pgsql/src/test/regress/sql/alter_table.sql,v
retrieving revision 1.47
diff -c -r1.47 alter_table.sql
*** src/test/regress/sql/alter_table.sql 28 Aug 2004 22:06:04 -0000 1.47
--- src/test/regress/sql/alter_table.sql 21 Jan 2005 01:02:35 -0000
***************
*** 348,354 ****
-- test unique constraint adding
! create table atacc1 ( test int );
-- add a unique constraint
alter table atacc1 add constraint atacc_test1 unique (test);
-- insert first value
--- 348,354 ----
-- test unique constraint adding
! create table atacc1 ( test int ) with oids;
-- add a unique constraint
alter table atacc1 add constraint atacc_test1 unique (test);
-- insert first value
***************
*** 402,408 ****
-- test primary key constraint adding
! create table atacc1 ( test int );
-- add a primary key constraint
alter table atacc1 add constraint atacc_test1 primary key (test);
-- insert first value
--- 402,408 ----
-- test primary key constraint adding
! 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,491 ****
-- 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);
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";
--- 485,491 ----
-- 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) 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,588 ****
alter table nosuchtable drop column bar;
-- test dropping columns
! create table atacc1 (a int4 not null, b int4, c int4 not null, d int4);
insert into atacc1 values (1, 2, 3, 4);
alter table atacc1 drop a;
alter table atacc1 drop a;
--- 582,588 ----
alter table nosuchtable drop column bar;
-- test dropping columns
! 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;
Index: src/test/regress/sql/copy2.sql
===================================================================
RCS file: /var/lib/cvs/pgsql/src/test/regress/sql/copy2.sql,v
retrieving revision 1.10
diff -c -r1.10 copy2.sql
*** src/test/regress/sql/copy2.sql 10 Jun 2004 17:56:03 -0000 1.10
--- src/test/regress/sql/copy2.sql 21 Jan 2005 00:52:30 -0000
***************
*** 4,10 ****
c text not null default 'stuff',
d text,
e text
! );
CREATE FUNCTION fn_x_before () RETURNS TRIGGER AS '
BEGIN
--- 4,10 ----
c text not null default 'stuff',
d text,
e text
! ) WITH OIDS;
CREATE FUNCTION fn_x_before () RETURNS TRIGGER AS '
BEGIN
Index: src/test/regress/sql/create_table.sql
===================================================================
RCS file: /var/lib/cvs/pgsql/src/test/regress/sql/create_table.sql,v
retrieving revision 1.7
diff -c -r1.7 create_table.sql
*** src/test/regress/sql/create_table.sql 21 May 2001 16:54:46 -0000 1.7
--- src/test/regress/sql/create_table.sql 21 Jan 2005 00:56:27 -0000
***************
*** 51,57 ****
stringu1 name,
stringu2 name,
string4 name
! );
CREATE TABLE tenk2 (
unique1 int4,
--- 51,57 ----
stringu1 name,
stringu2 name,
string4 name
! ) WITH OIDS;
CREATE TABLE tenk2 (
unique1 int4,
***************
*** 83,89 ****
CREATE TABLE emp (
salary int4,
manager name
! ) INHERITS (person);
CREATE TABLE student (
--- 83,89 ----
CREATE TABLE emp (
salary int4,
manager name
! ) INHERITS (person) WITH OIDS;
CREATE TABLE student (
Index: src/test/regress/sql/errors.sql
===================================================================
RCS file: /var/lib/cvs/pgsql/src/test/regress/sql/errors.sql,v
retrieving revision 1.11
diff -c -r1.11 errors.sql
*** src/test/regress/sql/errors.sql 14 Mar 2004 04:25:18 -0000 1.11
--- src/test/regress/sql/errors.sql 21 Jan 2005 00:49:04 -0000
***************
*** 10,18 ****
-- UNSUPPORTED STUFF
-- doesn't work
- -- attachas nonesuch
- --
- -- doesn't work
-- notify pg_class
--
--- 10,15 ----
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html