Re: the case for machine-readable error fields - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: the case for machine-readable error fields
Date
Msg-id 20090804232937.GT6494@alvh.no-ip.org
Whole thread Raw
In response to Re: the case for machine-readable error fields  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
Greg Stark wrote:

> So an alternate proposal is to add a field in the error message which
> contains the untranslated string. That would let applications always
> look at the untranslated string for parsing and always use the
> translated string for user displays.

That's an interesting idea, but you also have to consider other stuff
not related to translation, like schemas of the tables in question.
Someone requested some time ago to schema-qualify the table name (or a
constraint name, I don't recall offhand) in an error message, but this
idea was shot down because if that person really wanted that info, what
he should be looking at is including extra info in machine-readable
format into errors instead of a kluge like that.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: the case for machine-readable error fields
Next
From: Alvaro Herrera
Date:
Subject: Re: the case for machine-readable error fields