diff options
Diffstat (limited to 'src/backend/catalog/heap.c')
| -rw-r--r-- | src/backend/catalog/heap.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c index dea79dc4d6..b476a1181e 100644 --- a/src/backend/catalog/heap.c +++ b/src/backend/catalog/heap.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.231 2002/09/22 19:42:50 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.232 2002/10/21 22:06:18 tgl Exp $ * * * INTERFACE ROUTINES @@ -1917,20 +1917,9 @@ heap_truncate(Oid rid) Relation rel; /* Open relation for processing, and grab exclusive access on it. */ - rel = heap_open(rid, AccessExclusiveLock); /* - * TRUNCATE TABLE within a transaction block is dangerous, because if - * the transaction is later rolled back we have no way to undo - * truncation of the relation's physical file. Disallow it except for - * a rel created in the current xact (which would be deleted on abort, - * anyway). - */ - if (IsTransactionBlock() && !rel->rd_isnew) - elog(ERROR, "TRUNCATE TABLE cannot run inside a transaction block"); - - /* * Release any buffers associated with this relation. If they're * dirty, they're just dropped without bothering to flush to disk. */ |
