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

From Bruce Momjian
Subject Re: Patch for Improved Syntax Error Reporting
Date
Msg-id 200108020239.f722dnG04126@candle.pha.pa.us
Whole thread Raw
In response to Patch for Improved Syntax Error Reporting  (Neil Padgett <npadgett@redhat.com>)
Responses Re: Patch for Improved Syntax Error Reporting
List pgsql-patches
> > But how do they display error messages now?  Can't they just continue
> > doing that with this new code?  Do we want to make them code their own
> > error handling, and for what little benefit?  Let them figure out how to
> > display the error in fixed-width font and be done with it.  I am sure
> > they have bigger things to do than colorize error locations.
>
> My 2c:
>
> Why not do tom's suggestion for the POSITION: n thing, and modify psql to
> strip out that header, and output the relevant part of the sql with a caret
> highlighting the error position.
>
> This will make it so that writers of the guis and format errors how they
> like, and users of the most popular text interface (psql) get human-readable
> results...
>
> ie. best of both worlds...

OK, I withdraw my objection.

Also, I like the idea of adding Hints and Function/line numbers to the
output too.  The offset of the error would work into that system.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Revised Patch to allow multiple table locks in "Unison"
Next
From: "Christopher Kings-Lynne"
Date:
Subject: RE: Patch for Improved Syntax Error Reporting