Re: enhanced error fields - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: enhanced error fields
Date
Msg-id 5107DAB2.6010105@gmx.net
Whole thread Raw
In response to Re: enhanced error fields  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 1/28/13 11:08 PM, Tom Lane wrote:
> The issue is that
> this definition presupposes that we want to complain about a table or
> a domain, never both, because we're overloading both the SCHEMA_NAME
> and CONSTRAINT_NAME fields for both purposes.  This is annoying in
> validateDomainConstraint(), where we know the domain constraint that
> we're complaining about and also the table/column containing the bad
> value.  We can't fill in both TABLE_NAME and DATATYPE_NAME because
> they both want to set SCHEMA_NAME, and perhaps not to the same value.

I think any error should only complain about one object, in this case
the domain.  The table, in this case, is more like a context stack item.



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Performance Improvement by reducing WAL for Update Operation
Next
From: Kohei KaiGai
Date:
Subject: Re: [sepgsql 2/3] Add db_schema:search permission checks