---- -- 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)); ERROR: attempt to create referential integrity constraint on global temporary table 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); ERROR: attempt to create referential integrity constraint on global temporary table ROLLBACK; BEGIN; -- Must be valid statement CREATE TABLE t3 (c1 integer, FOREIGN KEY (c1) REFERENCES source (id)); ROLLBACK;