Re: the case for machine-readable error fields

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Josh Berkus <josh(at)agliodbs(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: the case for machine-readable error fields
Date: 2009-08-04 23:29:37
Message-ID: 20090804232937.GT6494@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2009-08-04 23:32:42 Re: the case for machine-readable error fields
Previous Message David Fetter 2009-08-04 23:28:02 Re: the case for machine-readable error fields