Skip site navigation (1) Skip section navigation (2)

Re: SQLSTATE of notice PGresult

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Euler Taveira de Oliveira <euler(at)timbira(dot)com>
Cc: Dmitriy Igrishin <dmitigr(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: SQLSTATE of notice PGresult
Date: 2010-08-25 00:19:40
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Fri, Aug 20, 2010 at 11:05 AM, Euler Taveira de Oliveira
<euler(at)timbira(dot)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
The Enterprise Postgres Company

In response to


pgsql-hackers by date

Next:From: KaiGai KoheiDate: 2010-08-25 00:43:16
Subject: Re: security hook on authorization
Previous:From: Robert HaasDate: 2010-08-25 00:18:19
Subject: Re: gSoC add MERGE command new patch -- merge_v104

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group