Error reporting

Поиск
Список
Период
Сортировка
От dDave
Тема Error reporting
Дата
Msg-id g8fuc0pkrcdaojj0h1ummum9ajpp1sakae@4ax.com
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Adam Smith
Дата:
Сообщение: Re: Installation problem - mutex_lock/unlock or libpq.so ?
Следующее
От: "Harry"
Дата:
Сообщение: cygwin installation problem (windows platform)