From: | patrick <patrick+pgsql(at)boxsoft(dot)com> |
---|---|
To: | Raj Mathur <raju(at)linux-delhi(dot)org> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: DBD::Pg transaction issues |
Date: | 2003-04-07 08:59:56 |
Message-ID: | 20030407015956.C18107@3eye.boxsoft.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Rajesh Kumar Mallah | 2003-04-07 14:27:15 | Re: DBD::Pg transaction issues |
Previous Message | Raj Mathur | 2003-04-07 08:38:13 | Re: DBD::Pg transaction issues |