pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Milen Dzhumerov <gamehack@1nsp1r3d.co.uk>
To: pgsql-interfaces@postgresql.org
Subject: Re: PQconnectdb et.all.
Date: Wed, 05 Apr 2006 15:29:34 +0100
Message-ID: <4433D44E.9040005@1nsp1r3d.co.uk> (raw)
In-Reply-To: <E1FQn9o-000Am9-Is@cs1.cs.huji.ac.il>
References: <E1FQn9o-000Am9-Is@cs1.cs.huji.ac.il>

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



view thread (4+ messages)

Message-ID: <4433D44E.9040005@1nsp1r3d.co.uk>
Permalink:  ../4433D44E.9040005@1nsp1r3d.co.uk/
Also on:    postgresql.org/message-id/4433D44E.9040005@1nsp1r3d.co.uk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: gamehack@1nsp1r3d.co.uk
  Subject: Re: PQconnectdb et.all.
  In-Reply-To: <4433D44E.9040005@1nsp1r3d.co.uk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox