From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Michael Glaesemann <grzm(at)myrealbox(dot)com> |
Cc: | pgsql-patches(at)postgreSQL(dot)org, pgsql-interfaces(at)postgreSQL(dot)org |
Subject: | Re: [PATCHES] Proposed patch for error locations |
Date: | 2006-03-13 15:11:31 |
Message-ID: | 7274.1142262691@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces pgsql-patches |
[ cross-posting to pgsql-interfaces in hopes of drawing more comments ]
Michael Glaesemann <grzm(at)myrealbox(dot)com> writes:
> On Mar 13, 2006, at 2:37 , Tom Lane wrote:
>> http://archives.postgresql.org/pgsql-patches/2006-03/msg00153.php
> This looks really nice.
>> One thing I'm noticing already is that the addition of "at character N"
>> to a lot of these messages isn't an improvement. In psql it's
>> certainly redundant with the error-cursor display.
> The pure character count is definitely difficult to use with larger
> queries. I think it could be more useful if it were
> line:char_of_line. Would others find this useful?
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;
^
from all libpq-using applications not just psql. We could make this
conditional on the error verbosity --- in "terse" mode the "LINE N"
output wouldn't appear, and "at character N" still would. Applications
should already be expecting multiline outputs from PQerrorMessage if
they're in non-terse mode, so this ought to be OK. Comments?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2006-03-13 15:32:09 | Re: Proposed p.tch for error locations |
Previous Message | Fabien COELHO | 2006-03-13 14:22:35 | Re: Proposed patch for error locations |
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2006-03-13 15:32:09 | Re: Proposed p.tch for error locations |
Previous Message | Fabien COELHO | 2006-03-13 14:22:35 | Re: Proposed patch for error locations |