Disallow foreign-key references from temp tables to permanent tables.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: a13b01853084b6c6f9c34944bc19b3dd7dc4ceb2
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2003-09-19T21:04:20Z
Releases: 7.4.1
Disallow foreign-key references from temp tables to permanent tables.
Per recent discussion, this does not work because other backends can't
reliably see tuples in a temp table and so cannot run the RI checks
correctly.  Seems better to disallow this case than go back to accessing
temp tables through shared buffers.  Also, disallow FK references to
ON COMMIT DELETE ROWS tables.  We already caught this problem for normal
TRUNCATE, but the path used by ON COMMIT didn't check.

Files