Re: Patch for Improved Syntax Error Reporting

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Neil Padgett <npadgett(at)redhat(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-patches(at)postgresql(dot)org" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Patch for Improved Syntax Error Reporting
Date: 2001-08-01 19:24:15
Message-ID: 200108011924.f71JOF809859@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

> Tom Lane wrote:
> >
> > Neil Padgett <npadgett(at)redhat(dot)com> writes:
> > > Attached please find a patch to the input parser that yields better
> > > syntax error reporting on parse errors.
> >
> > This has been discussed before (you guys really should spend more time
> > reading the mail list archives) and in fact you are not the first to

Tom, it is hard to imagine how they would even find relevant stuff on
this issue. The TODO.detail item is very vague. Would they start
searching for keywords in the mailing list search engine? Not sure what
keywords they would even use.

In fact, their solution is an improvement over what is in
TODO.detail/yacc now.

> I've just read the relevant messages. Though, I do find the list
> archives a bit slow for any useful browsing -- can I grab a copy of them
> from somewhere? Setting up a mirror might be an idea. . .

The whole internet seems slow today. I think it is that Code Red worm.

> > submit essentially this patch. The major objections to reporting syntax
> > problems this way, IIRC, are that (a) it makes unsupportable assumptions
> > about what the user interface looks like, for example the assumption
> > that the error message will be displayed in a fixed-width font; and
>
> Can you cite a client which does not use a fixed-width font at this
> time? I think most I've worked with use one for SQL interaction -- it is
> pretty much "the way things are done." I suppose, however, there could
> be some clients which display error messages in a dialog box or
> something similar, so I do agree that this is something that does need
> to be handled, and which the patch doesn't address. See below for a
> suggestion for this.

I know some people like a client-independent way of displaying errors,
but I like the direct approach of this patch, returning a string with
the error line highlighted and the location marked. I don't want to
push added complexity into the client, especially when we don't even
have a client who has this need yet.

IMHO, I am starting to see a lot of over-engineering demands made of
these patches. I think it is wasting time and is of little value to
average PostgreSQL users. Of course, others may disagree, but that is
my opinion.

So, my vote is to accept the patch as-is. When we have need for more
complex reporting, we can add it.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-08-01 19:35:58 Re: pltcl - lastoid
Previous Message Stephan Szabo 2001-08-01 19:22:07 Re: Accessing different databases in a cluster

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2001-08-01 19:35:58 Re: pltcl - lastoid
Previous Message Neil Padgett 2001-08-01 18:56:37 Re: Patch for Improved Syntax Error Reporting