Re: transactions on Postgresql

From: Vivek Khera <khera(at)kcilink(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: transactions on Postgresql
Date: 2001-05-26 02:09:52
Message-ID: x77kz4n9n3.fsf@yertle.kciLink.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>>>>> "DR" == Dave Robinson <lachesis(at)ignmail(dot)com> writes:

>> my problem : if an insert fail, all following insert are aborted :-(
>>
>> NB : it's not necessary to me that ALL inserts , will be done
>> with succes.
>> my question is : if a BAD insert fail , how can i do for doing
>> other inserts who may be are GOOD ?
>>
>> thanks a lot for help ;-)

DR> You want to look at wrapping your do statement into an eval block you
DR> can then capture the insert death in $@

Perl does not die; Postgres goes into ABORT STATE after the first
failure, and that is his problem. The only real way around this is to
not put the whole thing in a transaction.

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D. Khera Communications, Inc.
Internet: khera(at)kciLink(dot)com Rockville, MD +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Nils Zonneveld 2001-05-26 08:23:25 Re: Simple SQL question, need help.
Previous Message Vivek Khera 2001-05-26 02:01:22 Re: Sessions with Postgres