1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
----
-- Regression test to Global Temporary Table implementation
--
-- Test for unsupported foreign keys on GTT.
--
----
-- Import the library
-- LOAD 'pgtt';
-- Must throw ERROR: attempt to create referential integrity constraint on temporary table.
CREATE /*GLOBAL*/ TEMPORARY TABLE t2 (c1 integer, FOREIGN KEY (c1) REFERENCES source (id));
BEGIN;
CREATE /*GLOBAL*/ TEMPORARY TABLE t2 (c1 integer);
-- Must throw ERROR: attempt to create referential integrity constraint on temporary table.
ALTER TABLE t2 ADD FOREIGN KEY (c1) REFERENCES source (id);
ROLLBACK;
BEGIN;
-- Must be valid statement
CREATE TABLE t3 (c1 integer, FOREIGN KEY (c1) REFERENCES source (id));
ROLLBACK;
|