From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Amaresh Wakkar <babu_moshay(at)indiatimes(dot)com> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #2370: 25P02, current transaction is aborted, commands ignored until end of transaction block |
Date: | 2006-04-03 00:36:47 |
Message-ID: | 20060403003647.GB27131@surnet.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Amaresh Wakkar wrote:
> 3.In one of the inserts we must ignore the failure due to duplicate rows i.e
> Error state 23505 and continue with remainder set of inserts. Presence of
> duplicate rows will not be treated as an error condition in this context and
> system must function normally without aborting the whole transaction (This
> is what PostgreSQL is doing currently after first failure I get 25P02 and
> all other inserts are ignored completely). I get following error:
>
> org.postgresql.util.PSQLException: ERROR: current transaction is aborted,
> commands ignored until end of transaction block
Sure. You can set a SAVEPOINT before trying the insert; if it fails,
ROLLBACK TO said savepoint and you can continue merrily with the rest of
your transaction.
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2006-04-03 13:16:24 | Re: BUG #2364: DB Error: connect failed ... PHP/PostgreSql |
Previous Message | Anthony Ransley | 2006-04-03 00:36:26 | PostgreSQL 8.1.3.6044 crashes randomly. |