Unix Technical Forum

Is there a trace facility for postgres/php?

This is a discussion on Is there a trace facility for postgres/php? within the pgsql Novice forums, part of the PostgreSQL category; --> Hi all, I am writing a php/postgres application. I have been printing out commands and errors at each step ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Novice

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-10-2008, 03:06 PM
Mary Anderson
 
Posts: n/a
Default Is there a trace facility for postgres/php?

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-10-2008, 03:06 PM
Guido Barosio
 
Posts: n/a
Default Re: Is there a trace facility for postgres/php?

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

--
Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:20 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com