]> granicus.if.org Git - postgresql/commit
Disallow foreign-key references from temp tables to permanent tables.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 19 Sep 2003 21:04:20 +0000 (21:04 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 19 Sep 2003 21:04:20 +0000 (21:04 +0000)
commita13b01853084b6c6f9c34944bc19b3dd7dc4ceb2
tree16a4d742afd089eaca684f7e9b86554a044a638d
parentfc6b7c550da8ac47df7d34df523428c553e6c9a3
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.
doc/src/sgml/ref/truncate.sgml
src/backend/catalog/heap.c
src/backend/commands/tablecmds.c
src/include/catalog/heap.h
src/test/regress/expected/truncate.out