Re: patch for 9.2: enhanced errors

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: patch for 9.2: enhanced errors
Date: 2011-07-18 19:20:56
Message-ID: 4134.1311016856@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Josh Berkus <josh(at)agliodbs(dot)com> writes:
> Tom,
>> 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.

> Are we talking about FK constraints here, or CHECK contstraints?

Either one. They both have the potential to reference more than one
column, so if the committee had meant errors to try to identify the
referenced columns, they'd have put something other than COLUMN_NAME
into the standard. They didn't.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-07-18 19:26:44 Re: per-column generic option
Previous Message Tom Lane 2011-07-18 19:19:11 Re: Initial Review: JSON contrib modul was: Re: Another swing at JSON