Re: PQconnectdb et.all. - Mailing list pgsql-interfaces

From Milen Dzhumerov
Subject Re: PQconnectdb et.all.
Date
Msg-id 4433D44E.9040005@1nsp1r3d.co.uk
Whole thread Raw
In response to PQconnectdb et.all.  (Danny Braniss <danny@cs.huji.ac.il>)
List pgsql-interfaces
Danny Braniss wrote:
> How can I programatically figure out why PQconnectdb failed?
> The reason for this is that my daemon needs to know:
>     1- if to try and reconnect (for example, if it's timing out) 
>     2- abandom, if for example it has not permition.
> thanks,
>     danny
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>
>   
Just determine the SQLState from the last operation and use this table 
http://www.postgresql.org/docs/8.1/static/errcodes-appendix.html

Regards,
gamehack


pgsql-interfaces by date:

Previous
From: Andy Chambers
Date:
Subject: Re: PQconnectdb et.all.
Next
From: "Greg Sabino Mullane"
Date:
Subject: DBD::Pg version 1.48 released