transactions on Postgresql - Mailing list pgsql-general

From hicham bouzdad
Subject transactions on Postgresql
Date
Msg-id 3B0B8A0C.B46AC073@inovaction.com
Whole thread Raw
Responses Re: transactions on Postgresql  (Marek Pętlicki <marpet@buy.pl>)
List pgsql-general
Hi everybody,

my subject is about :   DBI / PostgreSql  &  Transactions  with Perl.
my code is :

$dbh->{AutoCommit} = 0;      #-------- begin of transaction
while (<FILE>) {
...
    $sql  =  "insert into $table ($col) values ($val)";
    $res  =  $dbh->do($sql);
}

$dbh->rollback;                    #--------- end of transaction

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 ;-)


pgsql-general by date:

Previous
From: Carlos Moreno
Date:
Subject: Re: I want more Money (the data type, of course! :-))
Next
From: Linh Luong
Date:
Subject: Postgres performance issue