Skip site navigation (1) Skip section navigation (2)

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
Message-ID: Pine.LNX.4.58.0403181950040.1388@sablons.cri.ensmp.fr (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

Responses

pgsql-hackers by date

Next:From: Kurt RoeckxDate: 2004-03-18 19:18:40
Subject: Re: [HACKERS] fsync method checking
Previous:From: Bruce MomjianDate: 2004-03-18 18:50:32
Subject: Re: [HACKERS] fsync method checking

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group