Re: BUG #2812: Transaction is aborted after error

From: <Alex_Piyevsky(at)ibi(dot)com>
To: <alvherre(at)commandprompt(dot)com>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #2812: Transaction is aborted after error
Date: 2006-12-06 22:46:06
Message-ID: 8EC4F0A8AC7A6D40BF9C55E32249A9165BF69E@IBIUSMBSA.ibi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Thank you for your help and prompt response.

Regards,
Alex

-----Original Message-----
From: Alvaro Herrera [mailto:alvherre(at)commandprompt(dot)com]
Sent: Wednesday, December 06, 2006 5:43 PM
To: Piyevsky, Alex
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: [BUGS] BUG #2812: Transaction is aborted after error

Alex Piyevsky wrote:

> We issue a command which drops the existing table and recreates the
table
> under the same name, all in one transaction. If the table does not
> previously exist, an error message is returned for the drop command
and the
> transaction aborts with the following:
>
> current transaction is aborted, commands ignored until end of
transaction
> block

This is the intended behavior. In 8.2 you can use "DROP TABLE IF
EXISTS". In previous versions you can set a savepoint before the DROP
TABLE; or you can do the DROP TABLE outside the transaction.

--
Alvaro Herrera
http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2006-12-06 22:55:32 Re: BUG #2811: Error determining param type in prepared statement of unused variable
Previous Message Alvaro Herrera 2006-12-06 22:42:47 Re: BUG #2812: Transaction is aborted after error