Re: [GENERAL] Range for user-defined SQLSTATE codes

2013-01-26 Thread Tom Lane
Kevin Grittner writes: > Ian Pilcher wrote: >> Is there anything like a standard range -- formal or otherwise -- for >> such codes? A best practice? A general consensus? A half-painted >> bike shed? > There is this in the SQL standard. According to that, SQLSTATE > values with 0-4 or A-H in

Re: [GENERAL] Range for user-defined SQLSTATE codes

2013-01-26 Thread Kevin Grittner
Ian Pilcher wrote: > I can't be the first person (or even the 10,000th) to want to define my > own SQLSTATE codes when raising errors in a stored procedure.  I've > just tested doing so in a PL/pgSQL function access via JDBC, and I had > no problem retrieving the non-standard state from the SQLEx

[GENERAL] Range for user-defined SQLSTATE codes

2013-01-25 Thread Ian Pilcher
I can't be the first person (or even the 10,000th) to want to define my own SQLSTATE codes when raising errors in a stored procedure. I've just tested doing so in a PL/pgSQL function access via JDBC, and I had no problem retrieving the non-standard state from the SQLException. (I used 'W' and