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

From Tom Lane
Subject Re: Patch for Improved Syntax Error Reporting
Date
Msg-id 18145.996704520@sss.pgh.pa.us
Whole thread Raw
In response to Re: Patch for Improved Syntax Error Reporting  (Fernando Nasser <fnasser@cygnus.com>)
List pgsql-patches
Fernando Nasser <fnasser@cygnus.com> writes:
> If instead of printing:
> ERROR: A parse error near "foo"
> we print
> ERROR: A parse error near "foo" (index=10)
> it should not affect any of the existing clients.

One objection to this idea is that it doesn't play nicely with
localization of error message texts.  I'd sooner do

    ERROR: A parse error near "foo"
    ERRORLOCATION: 10

which doesn't create any problems with localization (there's no
particular need to translate the keywords, since a client probably
wouldn't show them to the user anyway).  It's just as backward
compatible, and not that much uglier for an old client.

            regards, tom lane

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Patch to contrib/fulltextindex/fti.sql
Next
From: Neil Padgett
Date:
Subject: Re: Patch for Improved Syntax Error Reporting