Re: Patch for Improved Syntax Error Reporting - Mailing list pgsql-patches

From Peter Eisentraut
Subject Re: Patch for Improved Syntax Error Reporting
Date
Msg-id Pine.LNX.4.30.0108052231300.10846-100000@peter.localdomain
Whole thread Raw
In response to Re: Patch for Improved Syntax Error Reporting  (Neil Padgett <npadgett@redhat.com>)
List pgsql-patches
Neil Padgett writes:

> 1. Leave elog() alone.
> 2. For syntax error reporting, and syntax error reporting alone, output
> the error message in the new, multi-line format from the backend.
> 3. Add functionality to psql for parsing the multi-line format error
> messages. (Probably this will form a reusable function library that
> other utilities can use.)
> 4. Modify psql to use this new functionality, but only for processing
> parse errors -- all other messages will be handled as is.

We've had a discussion a month or two ago about rearranging error and
notice packets into key/value pairs, which would contain error codes,
command string positions, and what not.  I opined that this would require
a wire protocol change.  I do not like the alternative suggestion of
separating these pairs by newlines or some such.  That puts a rather
peculiar (and possibly not automatically enforcable) restriction on the
allowable contents of the message texts.  Note that message texts can
contain parse or plan trees, which can contain all kinds of funny line
noise.  A protocol change isn't the end of the world, so please consider
it.

Btw., there's something in the SQL standard about all of this.  I can tell
you more once I'm done reading back emails.

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter


pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Re: Autoconf 2.50 is out (was Re: Re: OpenUnix 8 Patch)
Next
From: Dave Page
Date:
Subject: RE: Patch for Improved Syntax Error Reporting