Clarification of certain SQLSTATE class - Mailing list pgsql-hackers

From gabrielle
Subject Clarification of certain SQLSTATE class
Date
Msg-id CAHRs-_f1uwo-HcuMKyMGX4SkoL284yGqrOE6JCUqxv=vMF4mCA@mail.gmail.com
Whole thread Raw
Responses Re: Clarification of certain SQLSTATE class
Re: Clarification of certain SQLSTATE class
List pgsql-hackers
I'm working with some DB2 users, converting them to Pg, and I'm a bit confused about a certain class of SQLSTATE codes, specifically 02xxx "No data" (http://www.postgresql.org/docs/9.2/static/errcodes-appendix.html)

As an example:  I enable %e in log_line_prefix so I can see the SQLSTATE values.  I run an UPDATE against a non-existent row, and find that my SQLSTATE value is 00000, indicating success.  I understand that this could be considered a 'success' because the query didn't actually throw an error;  but, based on the spec, I expected to see a SQLSTATE of 02000.

I thought that Pg always generated an appropriate SQLSTATE code, and that it was just up to $client code to pick up that value, but that doesn't seem to be the case.  Is this part of the SQL standard we don't implement?

Thanks!

gabrielle

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: has_language_privilege returns incorrect answer for non-superuser
Next
From: Tom Lane
Date:
Subject: Re: autovacuum not prioritising for-wraparound tables