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

From Euler Taveira de Oliveira
Subject Re: SQLSTATE of notice PGresult
Date
Msg-id 4C6E99A2.6050801@timbira.com
Whole thread Raw
In response to SQLSTATE of notice PGresult  (Dmitriy Igrishin <dmitigr@gmail.com>)
Responses Re: SQLSTATE of notice PGresult
List 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/


pgsql-hackers by date:

Previous
From: Max Bowsher
Date:
Subject: Re: git: uh-oh
Next
From: "Kevin Grittner"
Date:
Subject: Re: Avoiding deadlocks ...