Re: PQconnectdb et.all.

From: Milen Dzhumerov <gamehack(at)1nsp1r3d(dot)co(dot)uk>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: PQconnectdb et.all.
Date: 2006-04-05 14:29:34
Message-ID: 4433D44E.9040005@1nsp1r3d.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Greg Sabino Mullane 2006-04-06 03:03:29 DBD::Pg version 1.48 released
Previous Message Andy Chambers 2006-04-05 11:34:46 Re: PQconnectdb et.all.