Re: the case for machine-readable error fields - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: the case for machine-readable error fields
Date
Msg-id 200908050018.31744.peter_e@gmx.net
Whole thread Raw
In response to Re: the case for machine-readable error fields  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tuesday 04 August 2009 23:19:24 Tom Lane wrote:
> Also, you completely dodged the question of defining what the fields
> really mean, which would be 100% essential to doing anything automatic
> with the results.  If "errtable" sometimes means a table that doesn't
> exist, and sometimes means a table that exists but doesn't contain an
> expected column, or sometimes a table that exists but doesn't contain
> an expected value, or sometimes a table that exists and contains a
> value that shouldn't be there, etc etc, then actually doing anything
> interesting with the information is going to be a matter of guess and
> hope rather than something that's reliably automatable.

The SQL standard contains an analogous facility that defines exactly that.  
Look for <get diagnostics statement>.  It specifies what the "table name" etc. 
is in specific error situations.


pgsql-hackers by date:

Previous
From: Zdenek Kotala
Date:
Subject: head contrib is broken (crypto)
Next
From: Tom Lane
Date:
Subject: Re: the case for machine-readable error fields