Re: SQL conformity regarding SQLSTATE

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jürgen Purtz <juergen(at)purtz(dot)de>
Cc: pgsql-sql(at)lists(dot)postgresql(dot)org
Subject: Re: SQL conformity regarding SQLSTATE
Date: 2017-12-21 01:28:15
Message-ID: 11558.1513819695@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

=?UTF-8?Q?J=c3=bcrgen_Purtz?= <juergen(at)purtz(dot)de> writes:
> Summary: 01008, 03000, 0B000, 39001, F0000, and F0001 do not conform to
> the standard.

I poked around in SQL:2011 and I concur that the first four of those
no longer appear in the standard. However, unless grep is failing me,
we aren't generating those errcodes anywhere either:

ERRCODE_WARNING_IMPLICIT_ZERO_BIT_PADDING
ERRCODE_SQL_STATEMENT_NOT_YET_COMPLETE
ERRCODE_INVALID_TRANSACTION_INITIATION
ERRCODE_E_R_I_E_INVALID_SQLSTATE_RETURNED

So we could just remove those codes and be no worse off.

As for the other two, ERRCODE_CONFIG_FILE_ERROR and
ERRCODE_LOCK_FILE_EXISTS, we certainly are using those, but
as I mentioned it seems somewhat unlikely that clients are
testing for them. I'm tempted to propose renumbering them
as PF000 and PF001.

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jürgen Purtz 2017-12-21 10:44:46 Re: SQL conformity regarding SQLSTATE
Previous Message Simon Riggs 2017-12-20 12:02:29 Re: SQL conformity regarding SQLSTATE