Table creation in transactions

Started by Mihai Gheorghiuover 23 years ago3 messagesgeneral
Jump to latest
#1Mihai Gheorghiu
tanethq@earthlink.net

I have a transaction in which a table is created at some point.
If the transaction is rolled back, does the table remain, or is it
automatically dropped?
Thank you all,
Mihai

#2John Gray
jgray@azuli.co.uk
In reply to: Mihai Gheorghiu (#1)
Re: Table creation in transactions

On Tue, 2002-08-06 at 20:55, Mihai Gheorghiu wrote:

I have a transaction in which a table is created at some point.
If the transaction is rolled back, does the table remain, or is it
automatically dropped?

It is dropped when the transaction is rolled back. I believe that old
(pre 7.0? ) versions of PG had problems with creating tables in a
transaction, but this hasn't been the case for a while.

Regards

John

--
John Gray
Azuli IT
www.azuli.co.uk

#3Darren Ferguson
darren@crystalballinc.com
In reply to: Mihai Gheorghiu (#1)
Re: Table creation in transactions

It will be dropped since it was part of the transaction and when you
rollback it will be removed

HTH

On Tue, 6 Aug 2002, Mihai Gheorghiu wrote:

I have a transaction in which a table is created at some point.
If the transaction is rolled back, does the table remain, or is it
automatically dropped?
Thank you all,
Mihai

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

--
Darren Ferguson