pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Glaesemann <grzm@myrealbox.com>
Cc: pgsql-patches@postgreSQL.org
Cc: pgsql-interfaces@postgreSQL.org
Subject: Re: [PATCHES] Proposed patch for error locations
Date: Mon, 13 Mar 2006 10:11:31 -0500
Message-ID: <7274.1142262691@sss.pgh.pa.us> (raw)
In-Reply-To: <C3817205-17E1-4D6C-9D92-ED6045123F92@myrealbox.com>
References: <5114.1142185055@sss.pgh.pa.us>
	<C3817205-17E1-4D6C-9D92-ED6045123F92@myrealbox.com>

[ cross-posting to pgsql-interfaces in hopes of drawing more comments ]

Michael Glaesemann <grzm@myrealbox.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



view thread (7+ messages)  latest in thread

Message-ID: <7274.1142262691@sss.pgh.pa.us>
Permalink:  ../7274.1142262691@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7274.1142262691@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, grzm@myrealbox.com, pgsql-patches@postgreSQL.org
  Subject: Re: [PATCHES] Proposed patch for error locations
  In-Reply-To: <7274.1142262691@sss.pgh.pa.us>

* 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