Thread: Is there a trace facility for postgres/php?

Is there a trace facility for postgres/php?

From
Mary Anderson
Date:
Hi all,
    I am writing a php/postgres application.  I have been printing out
commands and errors at each step of the way.  In the past I have used a
trace facility to find out what the last SQL command the database ran.
Is such a thing available in php/postgres?  I know how to get the most
recent SQL error on a connection and print it out.

Thanks

Mary

Re: Is there a trace facility for postgres/php?

From
"Guido Barosio"
Date:
Mary,

    Try this function pg_last_error() :

http://www.php.net/manual/en/function.pg-last-error.php

Regards,
gb.-

On Fri, May 9, 2008 at 1:20 PM, Mary Anderson
<maryfran@demog.berkeley.edu> wrote:
> Hi all,
>   I am writing a php/postgres application.  I have been printing out
> commands and errors at each step of the way.  In the past I have used a
> trace facility to find out what the last SQL command the database ran. Is
> such a thing available in php/postgres?  I know how to get the most recent
> SQL error on a connection and print it out.
>
> Thanks
>
> Mary
>
> --
> Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-novice
>



--
Guido Barosio
-----------------------
http://www.globant.com
guido.barosio@globant.com