aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-09-19 21:04:20 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-09-19 21:04:20 +0000
commita13b01853084b6c6f9c34944bc19b3dd7dc4ceb2 (patch)
tree16a4d742afd089eaca684f7e9b86554a044a638d /doc/src
parentfc6b7c550da8ac47df7d34df523428c553e6c9a3 (diff)
downloadpostgresql-a13b01853084b6c6f9c34944bc19b3dd7dc4ceb2.tar.gz
postgresql-a13b01853084b6c6f9c34944bc19b3dd7dc4ceb2.zip
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.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/truncate.sgml12
1 files changed, 11 insertions, 1 deletions
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 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/truncate.sgml,v 1.13 2003/09/12 00:12:47 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/truncate.sgml,v 1.14 2003/09/19 21:04:19 tgl Exp $
PostgreSQL documentation
-->
@@ -51,6 +51,16 @@ TRUNCATE [ TABLE ] <replaceable class="PARAMETER">name</replaceable>
</refsect1>
<refsect1>
+ <title>Notes</title>
+
+ <para>
+ <command>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.
+ </para>
+ </refsect1>
+
+ <refsect1>
<title>Examples</title>
<para>