Re: the case for machine-readable error fields

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: the case for machine-readable error fields
Date: 2009-08-05 17:13:11
Message-ID: 20090805171311.GQ5407@samason.me.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 05, 2009 at 11:32:06AM -0500, Kevin Grittner wrote:
> Sam Mason <sam(at)samason(dot)me(dot)uk> wrote:
> > Not sure if overloading SQLSTATE is the right way of doing this is
> > it? It already has things like 23514 for a check violation and any
> > other client code relying in this would break if it started getting
> > different things back.
>
> If that's the standard SQLSTATE, I agree -- it suggests a need for
> some user-controllable field which could be set to a value to indicate
> a particular problem. Does the standard have anything like that, or
> would that be an extension?

Not sure how standard it is, but the docs[1] would suggest that it's
trying to following something. Microsoft's MSDN docs on ODBC[2] show a
reasonable similarity, the first Oracle doc I found[3] where similar as
well.

It just looks like a fixed set of numbers for a fixed set of conditions,
can't find any canonical definition about what it's really for though.

--
Sam http://samason.me.uk/

[1] http://www.postgresql.org/docs/current/static/errcodes-appendix.html
[2] http://msdn.microsoft.com/en-us/library/ms714687(VS.85).aspx
[3] http://download.oracle.com/docs/cd/B19306_01/appdev.102/a58231/appd.htm

I think I prefer PG's urls!

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-08-05 17:18:27 Re: GRANT ON ALL IN schema
Previous Message Tom Lane 2009-08-05 16:59:52 Re: GRANT ON ALL IN schema