[GENERAL] PHP PDO-PGSQL and transactions

2008-12-01 Thread Bart Degryse
I'm having a transaction problem when executing prepared statements using the PHP PDO-PGSQL module. What happens is this: On the first $subItem, $checkSubscription goes well, but $insertReminderEntry fails with error Duplicate key violates unique constraint This error should just be logged and

Re: [GENERAL] PHP PDO-PGSQL and transactions

2008-12-01 Thread Bart Degryse
Thanks Martijn! Martijn van Oosterhout [EMAIL PROTECTED] 2008-12-01 10:54 On Mon, Dec 01, 2008 at 10:14:52AM +0100, Bart Degryse wrote: I'm having a transaction problem when executing prepared statements using the PHP PDO-PGSQL module. What happens is this: On the first $subItem

Re: [GENERAL] Record Types Structure in PL/pgSQL

2007-06-08 Thread Bart Degryse
Impossible in plpgsql. Use plperl instead. Diego Sanchez R. [EMAIL PROTECTED] 2007-06-08 14:14 Hi there. Is there any way of determining the actual structure of a record variable? E. g. I've written a small script to do some calculations over some fields with a dinamically generated query. It

Re: [GENERAL] plperl and/or insert trigger problem

2007-06-07 Thread Bart Degryse
Richard Huxton wrote: I'm no guru myself... Don't underestimate yourself, after all you found the code where it goes wrong Looks OK to me, except you'll not get any error message on the last row - the insert will be called after the fetch. I do get an error message on the last row (assuming

[GENERAL] plperl and/or insert trigger problem

2007-06-06 Thread Bart Degryse
I'm writing a function that fetches data in an Oracle database and stores it in postgresql database. The fetching from Oracle and the inserting in PostgreSQL both work correctly. I know this because with an empty target table and without an insert trigger the source data gets 'copied'

Re: [GENERAL] plperl and/or insert trigger problem

2007-06-06 Thread Bart Degryse
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

Re: [GENERAL] plperl and/or insert trigger problem

2007-06-06 Thread Bart Degryse
my method: .$dbh_pg-errstr.\n if $dbh_pg-err; return $ary_ref; }; then the expected exception messages get printed. Is this a acceptable way to do it in your opinion? Richard Huxton [EMAIL PROTECTED] 2007-06-06 16:04 Bart Degryse wrote: Using DBI-err was a leftover from earlier testing