From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Sean Chittenden <chitt(at)speakeasy(dot)net> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: Slightly better testing for pg_ctl(1)'s -w... |
Date: | 2004-10-14 22:18:10 |
Message-ID: | 200410142218.i9EMIA809612@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Added to TODO:
* Allow libpq to access SQLSTATE so pg_ctl can test for connection failure
This would be used for checking if the server is up.
---------------------------------------------------------------------------
Sean Chittenden wrote:
> >>> ... it should have a SQLSTATE assigned, so you could
> >>> check for ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION ...
> >
> >> Ok, I've read over the code a little bit... it doesn't seem like
> >> there's an obvious way to get the error code via libpq(3).
> >
> > Hmmm ... I was thinking of PQresultErrorField, but you don't actually
> > get a PGresult from a connection failure, so that's no good :-(.
> >
> > I suppose we need to think about extending libpq so that a SQLSTATE
> > can be retrieved for connection-level failures. That kinda moves
> > it out of the realm of bug-fix-for-beta though.
>
> Whew, glad it wasn't me. Could we (ie Bruce) add getting the raw
> errcode as an 8.1 TODO item? In the mean time, are you going to commit
> the pg_ctl patch? -sc
>
> --
> Sean Chittenden
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-10-14 22:33:46 | Re: Casting INT4 to BOOL... |
Previous Message | Bruce Momjian | 2004-10-14 20:22:46 | Re: cast pid_t to int when using *printf |