From a13b01853084b6c6f9c34944bc19b3dd7dc4ceb2 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 19 Sep 2003 21:04:20 +0000 Subject: 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 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'doc/src') diff --git a/doc/src/sgml/ref/truncate.sgml b/doc/src/sgml/ref/truncate.sgml index fc65f65db55..aa27890f47e 100644 --- a/doc/src/sgml/ref/truncate.sgml +++ b/doc/src/sgml/ref/truncate.sgml @@ -1,5 +1,5 @@ @@ -50,6 +50,16 @@ TRUNCATE [ TABLE ] name + + Notes + + + TRUNCATE cannot be used if there are foreign-key references + to the table from other tables. Checking validity in such cases would + require table scans, and the whole point is not to do one. + + + Examples -- cgit v1.2.3