diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-09-19 21:04:20 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-09-19 21:04:20 +0000 |
| commit | a13b01853084b6c6f9c34944bc19b3dd7dc4ceb2 (patch) | |
| tree | 16a4d742afd089eaca684f7e9b86554a044a638d /src/include/catalog/heap.h | |
| parent | fc6b7c550da8ac47df7d34df523428c553e6c9a3 (diff) | |
| download | postgresql-a13b01853084b6c6f9c34944bc19b3dd7dc4ceb2.tar.gz | |
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 'src/include/catalog/heap.h')
| -rw-r--r-- | src/include/catalog/heap.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/catalog/heap.h b/src/include/catalog/heap.h index 86c97ff478..a9cd65ff06 100644 --- a/src/include/catalog/heap.h +++ b/src/include/catalog/heap.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: heap.h,v 1.61 2003/08/04 02:40:10 momjian Exp $ + * $Id: heap.h,v 1.62 2003/09/19 21:04:20 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -48,6 +48,8 @@ extern void heap_drop_with_catalog(Oid rid); extern void heap_truncate(Oid rid); +extern void heap_truncate_check_FKs(Relation rel); + extern void AddRelationRawConstraints(Relation rel, List *rawColDefaults, List *rawConstraints); |
