Re: DBD::Pg transaction issues - Mailing list pgsql-sql

From patrick
Subject Re: DBD::Pg transaction issues
Date
Msg-id 20030407015956.C18107@3eye.boxsoft.com
Whole thread Raw
In response to Re: DBD::Pg transaction issues  (Raj Mathur <raju@linux-delhi.org>)
List pgsql-sql
On Mon, Apr 07, 2003 at 02:08:13PM +0530, Raj Mathur wrote:
>     Rajesh> In perl-DBI eval is gnerally used for catching such SQLs
>     Rajesh> without aborting the program.
> 
> Am using eval's, but the transaction gets aborted in any case.  The
> eval is only useful for my program to trap the error.  I'm trying to
> find out how I can prevent the transaction mechanism from treating
> errors on the database as logical errors.
> 
> So is there no way to prevent PostgreSQL (or DBI) from aborting the
> current transaction if an operation on the database fails?

One thing you may consider is to insert your new records into a temp
table first.  Then when your program decides whether it should
"commit" then move the values from the temp table to your target
table, otherwise discard the entries in the temp table.

Hope this helps,

sidster
--
They who would sacrifice freedom for security will have neither.  -Ben Franklin 



pgsql-sql by date:

Previous
From: Raj Mathur
Date:
Subject: Re: DBD::Pg transaction issues
Next
From: Rajesh Kumar Mallah
Date:
Subject: Re: DBD::Pg transaction issues