From: Alvaro Herrera <alvherre@commandprompt.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Glaesemann <grzm@myrealbox.com>
Cc: pgsql-patches@postgreSQL.org
Cc: pgsql-interfaces@postgreSQL.org
Subject: Re: Proposed p.tch for error locations
Date: Mon, 13 Mar 2006 11:32:09 -0400
Message-ID: <20060313153209.GA15002@surnet.cl> (raw)
In-Reply-To: <7274.1142262691@sss.pgh.pa.us>
References: <5114.1142185055@sss.pgh.pa.us>
<C3817205-17E1-4D6C-9D92-ED6045123F92@myrealbox.com>
<7274.1142262691@sss.pgh.pa.us>
Tom Lane wrote:
> The change in behavior would actually be in libpq, because it's
> PQerrorMessage that is doing the deed (assuming a reasonably modern
> server and libpq). What I was considering proposing was that we migrate
> the error-cursor feature out of psql and into PQerrorMessage. This
> would mean that you'd get responses like
>
> ERROR: column "foo" does not exist
> LINE 1: select foo from a;
> ^
This doesn't work on terminal using a variable-width font, does it?
Sure, you can have all the interfaces use a monospace font, but it seems
a weird thing to do. I think the line/character position should be
returned in a separate error attribute in ereport. So for example
pgAdmin could count characters and mark it in bold or use a different
color.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: alvherre@commandprompt.com, tgl@sss.pgh.pa.us, grzm@myrealbox.com, pgsql-patches@postgreSQL.org
Subject: Re: Proposed p.tch for error locations
In-Reply-To: <20060313153209.GA15002@surnet.cl>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox