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

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 (view raw or flat)
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

pgsql-hackers by date

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

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