Re: syntax error position "CREATE FUNCTION" bug fix

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: syntax error position "CREATE FUNCTION" bug fix
Date: 2004-03-18 19:00:29
Views: Raw Message | Whole Thread | Download mbox
Lists: pgsql-hackers pgsql-patches

Dear Tom,

> > Any GUI can take advantage of the returned string to show it in a window
> > with fancy colors and do any hilighting around the position.
> But it cannot (easily) match it up with the *original input*

Sure. Even the parser in the backend cannot do it, that's the problem!;-)

> and put the cursor in the right place in the *input* window. You are
> envisioning something that's no better than psql with window borders.

I try to envision what is achievable with a reasonnable effort;-)

If I read you correctly, it is all interfaces or none... As a mostly;
psql user, I'm not lucky;-)

I don't think it is really easy to compute the good position wrt to the
original query if you want to keep into account escapes that are eaten by
the first parsing. I can provide a fix that would catch simple cases,
but not all of them.

Would you accept a "it works sometimes, but it may be wrong others" hack?

> My idea of a GUI syntax error report is something that puts my editing
> cursor in the right place.

Thus you decided that you prefer that NO interface should be able to show
the correct position, rather than having at least one to do it, and other
being able to display something, because you decided that the only place
to show something in a GUI is in the initial window or never. You don't
like dialog box, I guess;-)

Have a nice day,

Fabien Coelho - coelho(at)cri(dot)ensmp(dot)fr

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Kurt Roeckx 2004-03-18 19:18:40 Re: [HACKERS] fsync method checking
Previous Message Bruce Momjian 2004-03-18 18:50:32 Re: [HACKERS] fsync method checking

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-03-18 19:52:07 Re: syntax error position "CREATE FUNCTION" bug fix
Previous Message Tom Lane 2004-03-18 17:56:45 Re: syntax error position "CREATE FUNCTION" bug fix