]> granicus.if.org Git - postgresql/commitdiff
Suppress failures in parallel regress tests due to use of same table
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 11 May 2001 05:09:03 +0000 (05:09 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 11 May 2001 05:09:03 +0000 (05:09 +0000)
name in two different tests.  This solution does not meet with universal
approval, so it may get changed later ...

src/test/regress/expected/alter_table.out
src/test/regress/sql/alter_table.sql

index dab0c7f9c5caf462bbdb503f32fe501cfae13055..b8ea97d261da7f136cf70ded2c34f3394b726bf1 100644 (file)
@@ -314,9 +314,11 @@ NOTICE:  DROP TABLE implicitly drops referential integrity trigger from table "t
 NOTICE:  DROP TABLE implicitly drops referential integrity trigger from table "tmp2"
 DROP TABLE tmp2;
 -- Foreign key adding test with mixed types
-CREATE TABLE PKTABLE (ptest1 int PRIMARY KEY);
+-- Note: these tables are TEMP to avoid name conflicts when this test
+-- is run in parallel with foreign_key.sql.
+CREATE TEMP TABLE PKTABLE (ptest1 int PRIMARY KEY);
 NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'pktable_pkey' for table 'pktable'
-CREATE TABLE FKTABLE (ftest1 text);
+CREATE TEMP TABLE FKTABLE (ftest1 text);
 -- This next should fail, because text=int does not exist
 ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable;
 NOTICE:  ALTER TABLE ... ADD CONSTRAINT will create implicit trigger(s) for FOREIGN KEY check(s)
@@ -331,7 +333,7 @@ ERROR:  Unable to identify an operator '=' for types 'text' and 'int4'
 -- This should succeed, even though they are different types
 -- because varchar=int does exist
 DROP TABLE FKTABLE;
-CREATE TABLE FKTABLE (ftest1 varchar);
+CREATE TEMP TABLE FKTABLE (ftest1 varchar);
 ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable;
 NOTICE:  ALTER TABLE ... ADD CONSTRAINT will create implicit trigger(s) for FOREIGN KEY check(s)
 -- As should this
@@ -341,32 +343,35 @@ DROP TABLE pktable;
 NOTICE:  DROP TABLE implicitly drops referential integrity trigger from table "fktable"
 NOTICE:  DROP TABLE implicitly drops referential integrity trigger from table "fktable"
 DROP TABLE fktable;
-CREATE TABLE PKTABLE (ptest1 int, ptest2 text, PRIMARY KEY(ptest1, ptest2));
+CREATE TEMP TABLE PKTABLE (ptest1 int, ptest2 text,
+                           PRIMARY KEY(ptest1, ptest2));
 NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'pktable_pkey' for table 'pktable'
 -- This should fail, because we just chose really odd types
-CREATE TABLE FKTABLE (ftest1 cidr, ftest2 datetime);
+CREATE TEMP TABLE FKTABLE (ftest1 cidr, ftest2 datetime);
 ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2) references pktable;
 NOTICE:  ALTER TABLE ... ADD CONSTRAINT will create implicit trigger(s) for FOREIGN KEY check(s)
 ERROR:  Unable to identify an operator '=' for types 'cidr' and 'int4'
        You will have to retype this query using an explicit cast
 -- Again, so should this...
 DROP TABLE FKTABLE;
-CREATE TABLE FKTABLE (ftest1 cidr, ftest2 datetime);
-ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2) references pktable(ptest1, ptest2);
+CREATE TEMP TABLE FKTABLE (ftest1 cidr, ftest2 datetime);
+ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2)
+     references pktable(ptest1, ptest2);
 NOTICE:  ALTER TABLE ... ADD CONSTRAINT will create implicit trigger(s) for FOREIGN KEY check(s)
 ERROR:  Unable to identify an operator '=' for types 'cidr' and 'int4'
        You will have to retype this query using an explicit cast
 -- This fails because we mixed up the column ordering
 DROP TABLE FKTABLE;
-CREATE TABLE FKTABLE (ftest1 int, ftest2 text);
-ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2) references pktable(ptest2, ptest1);
+CREATE TEMP TABLE FKTABLE (ftest1 int, ftest2 text);
+ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2)
+     references pktable(ptest2, ptest1);
 NOTICE:  ALTER TABLE ... ADD CONSTRAINT will create implicit trigger(s) for FOREIGN KEY check(s)
 ERROR:  Unable to identify an operator '=' for types 'int4' and 'text'
        You will have to retype this query using an explicit cast
 -- As does this...
-ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest2, ftest1) references pktable(ptest1, ptest2);
+ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest2, ftest1)
+     references pktable(ptest1, ptest2);
 NOTICE:  ALTER TABLE ... ADD CONSTRAINT will create implicit trigger(s) for FOREIGN KEY check(s)
 ERROR:  Unable to identify an operator '=' for types 'text' and 'int4'
        You will have to retype this query using an explicit cast
-DROP TABLE FKTABLE;
-DROP TABLE PKTABLE;
+-- temp tables should go away by themselves, need not drop them.
index f0ac095c535fda08c762c253d44e2ff6fb3b9ae6..8b1b327693b74e1c4bd44913a9ae4557ca5d7c31 100644 (file)
@@ -214,8 +214,11 @@ DROP TABLE tmp2;
 
 -- Foreign key adding test with mixed types
 
-CREATE TABLE PKTABLE (ptest1 int PRIMARY KEY);
-CREATE TABLE FKTABLE (ftest1 text);
+-- Note: these tables are TEMP to avoid name conflicts when this test
+-- is run in parallel with foreign_key.sql.
+
+CREATE TEMP TABLE PKTABLE (ptest1 int PRIMARY KEY);
+CREATE TEMP TABLE FKTABLE (ftest1 text);
 -- This next should fail, because text=int does not exist
 ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable;
 -- This should also fail for the same reason, but here we
@@ -224,27 +227,30 @@ ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable(ptest1);
 -- This should succeed, even though they are different types
 -- because varchar=int does exist
 DROP TABLE FKTABLE;
-CREATE TABLE FKTABLE (ftest1 varchar);
+CREATE TEMP TABLE FKTABLE (ftest1 varchar);
 ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable;
 -- As should this
 ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable(ptest1);
 DROP TABLE pktable;
 DROP TABLE fktable;
 
-CREATE TABLE PKTABLE (ptest1 int, ptest2 text, PRIMARY KEY(ptest1, ptest2));
+CREATE TEMP TABLE PKTABLE (ptest1 int, ptest2 text,
+                           PRIMARY KEY(ptest1, ptest2));
 -- This should fail, because we just chose really odd types
-CREATE TABLE FKTABLE (ftest1 cidr, ftest2 datetime);
+CREATE TEMP TABLE FKTABLE (ftest1 cidr, ftest2 datetime);
 ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2) references pktable;
 -- Again, so should this...
 DROP TABLE FKTABLE;
-CREATE TABLE FKTABLE (ftest1 cidr, ftest2 datetime);
-ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2) references pktable(ptest1, ptest2);
+CREATE TEMP TABLE FKTABLE (ftest1 cidr, ftest2 datetime);
+ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2)
+     references pktable(ptest1, ptest2);
 -- This fails because we mixed up the column ordering
 DROP TABLE FKTABLE;
-CREATE TABLE FKTABLE (ftest1 int, ftest2 text);
-ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2) references pktable(ptest2, ptest1);
+CREATE TEMP TABLE FKTABLE (ftest1 int, ftest2 text);
+ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2)
+     references pktable(ptest2, ptest1);
 -- As does this...
-ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest2, ftest1) references pktable(ptest1, ptest2);
+ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest2, ftest1)
+     references pktable(ptest1, ptest2);
 
-DROP TABLE FKTABLE;
-DROP TABLE PKTABLE;
+-- temp tables should go away by themselves, need not drop them.