Re: enhanced error fields
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Peter Geoghegan <peter@2ndquadrant.com>
Cc: Stephen Frost <sfrost@snowman.net>, Tom Lane <tgl@sss.pgh.pa.us>, Pavel Stehule <pavel.stehule@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>, Alvaro Herrera <alvherre@commandprompt.com>
Date: 2013-01-04T17:12:20Z
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
On Sat, Dec 29, 2012 at 4:30 PM, Peter Geoghegan <peter@2ndquadrant.com> wrote:
> Ascertaining the identity of the object in question perfectly
> unambiguously, so that you can safely do something like lookup a
> comment on the object, seems like something way beyond what I'd
> envisioned for this feature. Why should the comment be useful in an
> error handler anyway? At best, that seems like a nice-to-have extra to
> me. The vast majority are not even going to think about the ambiguity
> that may exist. They'll just write:
>
> if (constraint_name == "upc")
> MessageBox("That is not a valid barcode.");
The people who are content to do that don't need this patch at all.
They can just apply a regexp to the message that comes back from the
server and then set constraint_name based on what pops out of the
regex. And then do just what you did there.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company