Re: plperl and/or insert trigger problem

From: "Bart Degryse" <Bart(dot)Degryse(at)indicator(dot)be>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: plperl and/or insert trigger problem
Date: 2007-06-06 13:10:36
Message-ID: 4666CE6B.A3DD.0030.0@indicator.be
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Using DBI->err was a leftover from earlier testing. $dbh_pg->err is of course better. But it doesn't solve the problem.

I'm not sure what you mean with your second remark.
The call to my function ( SELECT dbi_insert3(); ) is one transaction I suppose.
According to the documentation on execute_for_fetch (http://search.cpan.org/~timb/DBI-1.48/DBI.pm#execute_for_fetch) however
an execute is done for every fetched record and @tuple_status should contain the error message associated with each failed execute.

>>> Richard Huxton <dev(at)archonet(dot)com> 2007-06-06 12:19 >>>
I don't think this is the cause, but you're using DBI->err|errstr - do
you not want $dbh_pg->err|errstr? Otherwise, you can't identify
different errors on the oracle vs pg connections.

Second - it's not just that your function does the inserts in the
context of a single transaction, is it? That would mean you're just
seeing the original error repeated.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marco Colombo 2007-06-06 13:19:16 Re: PITR Base Backup on an idle 8.1 server
Previous Message Marco Colombo 2007-06-06 13:09:43 Re: PITR Base Backup on an idle 8.1 server