]> granicus.if.org Git - postgresql/commit
Disallow DROP TABLE/DROP INDEX inside a transaction block.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 5 Sep 1999 17:43:47 +0000 (17:43 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 5 Sep 1999 17:43:47 +0000 (17:43 +0000)
commit0041202b98dd6b5b24a4ac9e034e96ef7104f4bb
treea430927c6a831a4b8e026464c1de4366db9c6873
parent6645a73863102a54ce8e19586d2a0649c98cce5b
Disallow DROP TABLE/DROP INDEX inside a transaction block.
We can't support these properly, since once the relation's physical files
are unlinked, there's no way to roll back the transaction.  I suppose
we could postpone the unlink till transaction commit, but then what of
BEGIN; DROP TABLE foo; CREATE TABLE foo; ?
The code does allow dropping a table/index created in the current
transaction block, however, since the post-abort state would be that
the table doesn't exist anyway.
src/backend/catalog/heap.c
src/backend/catalog/index.c