Re: Patch for Improved Syntax Error Reporting

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Neil Padgett <npadgett(at)redhat(dot)com>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Patch for Improved Syntax Error Reporting
Date: 2001-08-05 20:37:18
Message-ID: Pine.LNX.4.30.0108052231300.10846-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers 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(at)gmx(dot)net http://funkturm.homeip.net/~peter

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2001-08-05 22:28:20 Possible solution for LIKE optimization
Previous Message Tom Lane 2001-08-05 20:17:08 Re: Re: Autoconf 2.50 is out (was Re: [PATCHES] Re: OpenUnix 8 Patch)

Browse pgsql-patches by date

  From Date Subject
Next Message Dave Page 2001-08-05 21:03:44 RE: Patch for Improved Syntax Error Reporting
Previous Message Tom Lane 2001-08-05 20:17:08 Re: Re: Autoconf 2.50 is out (was Re: [PATCHES] Re: OpenUnix 8 Patch)