summaryrefslogtreecommitdiff
path: root/src/test/regress
diff options
context:
space:
mode:
authorSimon Riggs2013-06-24 20:19:55 +0000
committerSimon Riggs2013-06-24 20:21:18 +0000
commit4f14c86d7434376b95477aeeb07fcc7272f4c47d (patch)
treec1812f4d17a42216fd75ab0731da3ddc8dbd47d5 /src/test/regress
parentb577a57d4113bcbd1a7900b78b3e41df528c9a35 (diff)
Reverting previous commit, pending investigation
of sporadic seg faults from various build farm members.
Diffstat (limited to 'src/test/regress')
-rw-r--r--src/test/regress/expected/foreign_key.out19
-rw-r--r--src/test/regress/sql/foreign_key.sql20
2 files changed, 0 insertions, 39 deletions
diff --git a/src/test/regress/expected/foreign_key.out b/src/test/regress/expected/foreign_key.out
index 0299bfe8730..04668a8886c 100644
--- a/src/test/regress/expected/foreign_key.out
+++ b/src/test/regress/expected/foreign_key.out
@@ -1132,15 +1132,6 @@ CREATE TEMP TABLE fktable (
id int primary key,
fk int references pktable deferrable initially deferred
);
--- check ALTER CONSTRAINT
-ALTER TABLE fktable ALTER CONSTRAINT fktable_fk_fkey NOT DEFERRABLE;
--- illegal option
-ALTER TABLE fktable ALTER CONSTRAINT fktable_fk_fkey NOT DEFERRABLE INITIALLY DEFERRED;
-ERROR: constraint declared INITIALLY DEFERRED must be DEFERRABLE
-LINE 1: ...e ALTER CONSTRAINT fktable_fk_fkey NOT DEFERRABLE INITIALLY ...
- ^
--- reset
-ALTER TABLE fktable ALTER CONSTRAINT fktable_fk_fkey DEFERRABLE INITIALLY DEFERRED;
INSERT INTO pktable VALUES (5, 10);
BEGIN;
-- doesn't match PK, but no error yet
@@ -1151,16 +1142,6 @@ UPDATE fktable SET id = id + 1;
COMMIT;
ERROR: insert or update on table "fktable" violates foreign key constraint "fktable_fk_fkey"
DETAIL: Key (fk)=(20) is not present in table "pktable".
--- change the constraint definition and retest
-ALTER TABLE fktable ALTER CONSTRAINT fktable_fk_fkey DEFERRABLE INITIALLY IMMEDIATE;
-BEGIN;
--- doesn't match PK, should throw error now
-INSERT INTO fktable VALUES (0, 20);
-ERROR: insert or update on table "fktable" violates foreign key constraint "fktable_fk_fkey"
-DETAIL: Key (fk)=(20) is not present in table "pktable".
-COMMIT;
--- reset
-ALTER TABLE fktable ALTER CONSTRAINT fktable_fk_fkey DEFERRABLE INITIALLY DEFERRED;
-- check same case when insert is in a different subtransaction than update
BEGIN;
-- doesn't match PK, but no error yet
diff --git a/src/test/regress/sql/foreign_key.sql b/src/test/regress/sql/foreign_key.sql
index 531c881f631..377b36c226b 100644
--- a/src/test/regress/sql/foreign_key.sql
+++ b/src/test/regress/sql/foreign_key.sql
@@ -818,13 +818,6 @@ CREATE TEMP TABLE fktable (
fk int references pktable deferrable initially deferred
);
--- check ALTER CONSTRAINT
-ALTER TABLE fktable ALTER CONSTRAINT fktable_fk_fkey NOT DEFERRABLE;
--- illegal option
-ALTER TABLE fktable ALTER CONSTRAINT fktable_fk_fkey NOT DEFERRABLE INITIALLY DEFERRED;
--- reset
-ALTER TABLE fktable ALTER CONSTRAINT fktable_fk_fkey DEFERRABLE INITIALLY DEFERRED;
-
INSERT INTO pktable VALUES (5, 10);
BEGIN;
@@ -838,19 +831,6 @@ UPDATE fktable SET id = id + 1;
-- should catch error from initial INSERT
COMMIT;
--- change the constraint definition and retest
-ALTER TABLE fktable ALTER CONSTRAINT fktable_fk_fkey DEFERRABLE INITIALLY IMMEDIATE;
-
-BEGIN;
-
--- doesn't match PK, should throw error now
-INSERT INTO fktable VALUES (0, 20);
-
-COMMIT;
-
--- reset
-ALTER TABLE fktable ALTER CONSTRAINT fktable_fk_fkey DEFERRABLE INITIALLY DEFERRED;
-
-- check same case when insert is in a different subtransaction than update
BEGIN;