Re: enhanced error fields
Pavel Stehule <pavel.stehule@gmail.com>
From: Pavel Stehule <pavel.stehule@gmail.com>
To: Peter Geoghegan <peter@2ndquadrant.com>, Alvaro Herrera <alvherre@commandprompt.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2012-07-05T16:41:38Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Create a "sort support" interface API for faster sorting.
- c6e3ac11b60a 9.2.0 cited
Attachments
- eelog-2012-07-05.patch (application/octet-stream) patch 2012
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