Re: SQLSTATE of notice PGresult

From: Euler Taveira de Oliveira <euler(at)timbira(dot)com>
To: Dmitriy Igrishin <dmitigr(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: SQLSTATE of notice PGresult
Date: 2010-08-20 15:05:06
Message-ID: 4C6E99A2.6050801@timbira.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

--
Euler Taveira de Oliveira
http://www.timbira.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2010-08-20 15:19:02 Re: Avoiding deadlocks ...
Previous Message Robert Haas 2010-08-20 14:34:49 Re: security hook on authorization