Error reporting - Mailing list pgsql-admin

From dDave
Subject Error reporting
Date
Msg-id g8fuc0pkrcdaojj0h1ummum9ajpp1sakae@4ax.com
Whole thread Raw
List pgsql-admin
Hi,

I use PG 7.4 and adoDB library with PHP to develop. Recently I noticed
errors were being logged in my /var/log/messages for Postgresql
errors, however, my transactions were not bombing out as expected.

A simple example:

$sql = "SELECT my_pgsql_function($x,$y)";

$db->BeginTrans();
$rs=$db->Execute($sql);
if(!$rs) {
    trigger_error($db->ErrorMsg());
    $db->RollbackTrans();
    exit;
} else {
    $db->CommitTrans();
}

Oddly enough, if the function my_pgsql_function() does not exist in
the pg_catalog, Postgresql reports the error to the messages file no
problem.

BUT, my $rs is not being set to false or NULL and hence the code tries
to commit a transaction, but, that is not right, since the log also
provides a message that it tried to commit a non-valid transaction???

Is there a method to the madness of postgresql errors I am missing
here with adodb???

Dave




pgsql-admin by date:

Previous
From: Adam Smith
Date:
Subject: Re: Installation problem - mutex_lock/unlock or libpq.so ?
Next
From: "Harry"
Date:
Subject: cygwin installation problem (windows platform)