Re: patch for 9.2: enhanced errors - Mailing list pgsql-hackers

From Tom Lane
Subject Re: patch for 9.2: enhanced errors
Date
Msg-id 3602.1311015404@sss.pgh.pa.us
Whole thread Raw
In response to Re: patch for 9.2: enhanced errors  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: patch for 9.2: enhanced errors
List pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes:
> There is only one issue, that should be solved first. I introduced non
> standard diagnostics field "column_names", because there is not
> possible get "column_name" value for check constraints now.  A correct
> implementation of COLUMN_NAME field needs a explicit relation between
> pg_constraint and pg_attribute - maybe implemented as new column to
> pg_constraint. Do you agree?

No, I don't.  You're adding complication to solve a problem that doesn't
need to be solved.  The standard says to return the name of the
constraint for a constraint-violation failure.  It does not say anything
about naming the associated column(s).  COLUMN_NAME is only supposed to
be defined for certain kinds of errors, and this isn't one of them.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Pavan Deolasee
Date:
Subject: Re: Single pass vacuum - take 1
Next
From: Robert Haas
Date:
Subject: Re: Initial Review: JSON contrib modul was: Re: Another swing at JSON