Re: SQLSTATE of notice PGresult - Mailing list pgsql-hackers

From Robert Haas
Subject Re: SQLSTATE of notice PGresult
Date
Msg-id AANLkTinssi=Mv59sv6rsHBZxSqn+WwCtzMS4HpHijJ-g@mail.gmail.com
Whole thread Raw
In response to Re: SQLSTATE of notice PGresult  (Euler Taveira de Oliveira <euler@timbira.com>)
Responses Re: SQLSTATE of notice PGresult  (Euler Taveira de Oliveira <euler@timbira.com>)
List pgsql-hackers
On Fri, Aug 20, 2010 at 11:05 AM, Euler Taveira de Oliveira
<euler@timbira.com> wrote:
> Dmitriy Igrishin escreveu:
>>   /* NOT presents - NULL. Why not "00000" ? */
>>   const char* sqlstate = Pg::PQresultErrorField(res, PG_DIAG_SQLSTATE);
>>
> That's because the protocol doesn't set error field when the command
> succeeded. IMHO it's an oversight (the documentation is correct but the code
> is not) and should be correct because the spec enforces it.

Seems like a waste of bytes.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: gSoC add MERGE command new patch -- merge_v104
Next
From: KaiGai Kohei
Date:
Subject: Re: security hook on authorization