Error reporting

From: dDave <tinywong(at)hotmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Error reporting
Date: 2004-06-15 18:17:18
Message-ID: g8fuc0pkrcdaojj0h1ummum9ajpp1sakae@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-admin by date

  From Date Subject
Next Message Robert Treat 2004-06-15 19:02:21 Re: table not shown
Previous Message Lee Wu 2004-06-15 17:14:31 Re: table not shown