Re: enhanced error fields

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Peter Geoghegan <peter(at)2ndquadrant(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: enhanced error fields
Date: 2012-07-05 16:41:38
Message-ID: CAFj8pRDtTDvoSvJT8PP08mQ_LW2HaOmWXvRUdoYLhk9xF7KMyw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello

there is a updated patch:

* renamed auxiliary functions and moved it elog.c - header is new file
"relerror.h"
* new fields "constraint_table" and "trigger_table" - constraints and
triggers are related to relation in pg, not just to schema
* removed using implicit constraints without unique name
* better coverage of enhancing errors in source code
* removed "inline" keywords

>
> /* Class 23 - Integrity Constraint Violation */
>
> This would be a reasonably well-defined place to require that this new
> infrastructure be used going forward (emphasis on the well-defined).
> Note that the authors of third-party database drivers define exception
> classes whose structure reflects these errcodes.h codes. To be
> inconsistent here seems unacceptable, since some future client of,
> say, pqxx (the example that I am personally most familiar with) might
> reasonably hope to always see some relation name when they call the
> e.relation_name() of some pqxx::integrity_constraint_violation object.
> If we were to commit the patch as-is, that would not be possible,
> because the following such sites that have not been touched:
>

>
> src/backend/executor/execQual.c
> 3786: (errcode(ERRCODE_NOT_NULL_VIOLATION),
>
> src/backend/utils/adt/domains.c
> 126: (errcode(ERRCODE_NOT_NULL_VIOLATION),

> src/backend/executor/execQual.c
> 3815: (errcode(ERRCODE_CHECK_VIOLATION),
>
> src/backend/utils/adt/domains.c
> 162: (errcode(ERRCODE_CHECK_VIOLATION),
>

these exceptions are related to domains - we has not adequate fields
now - and these fields are not in standards

it needs some like DOMAIN_NAME and DOMAIN_SCHEMA ???

Regards

Pavel

Attachment Content-Type Size
eelog-2012-07-05.patch application/octet-stream 31.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2012-07-05 16:57:52 Re: Schema version management
Previous Message Alvaro Herrera 2012-07-05 16:34:01 Re: Schema version management