Tom Lane wrote:
>
> Pursuant to a phone conversation I had with Bruce, I added code this
> morning to reject DROP TABLE or DROP INDEX inside a transaction block;
> that is, you can't do BEGIN; DROP TABLE foo; END anymore. The reason
> for rejecting this case is that we do the wrong thing if the transaction
> is later aborted. Following BEGIN; DROP TABLE foo; ABORT, the system
> tables will claim that foo is still valid (since the changes to them
> were never committed) but we've already unlinked foo's physical file,
> and we can't get it back. Solution: only allow DROP TABLE outside
> BEGIN, so that the user can't try to change his mind later.
What if table was created inside BEGIN/END?
Any reason to disallow DROP of local tables?
Vadim