[PATCHES] syntax error position "CREATE FUNCTION" bug fix

2004-03-18 Thread Fabien COELHO
Dear patchers, Please find attached a patch to fix the "CREATE FUNCTION" syntax error position bug I reported a few days ago. As the exact query being processed in only known to the backend (it may be the initial query, it may be a subset of the initial query, it may be some generated query?),

Re: [PATCHES] syntax error position "CREATE FUNCTION" bug fix

2004-03-18 Thread Tom Lane
Fabien COELHO <[EMAIL PROTECTED]> writes: > Please find attached a patch to fix the "CREATE FUNCTION" syntax error > position bug I reported a few days ago. This strikes me as much too intrusive to be worthwhile ... the problem is simply not important enough to justify a protocol change. Moreove

Re: [PATCHES] syntax error position "CREATE FUNCTION" bug fix

2004-03-18 Thread Fabien COELHO
Dear Tom, > > Please find attached a patch to fix the "CREATE FUNCTION" syntax error > > position bug I reported a few days ago. > > This strikes me as much too intrusive to be worthwhile ... the problem > is simply not important enough to justify a protocol change. Then I can suggest to happen

Re: [PATCHES] syntax error position "CREATE FUNCTION" bug fix

2004-03-18 Thread Tom Lane
Fabien COELHO <[EMAIL PROTECTED]> writes: >> Moreover, I don't like the proposed protocol change anyway. This >> approach only solves the problem for psql-like error reporting, namely >> clients that are going to regurgitate a string in their error message >> and aren't very picky about whether th

Re: [PATCHES] syntax error position "CREATE FUNCTION" bug fix

2004-03-18 Thread Fabien COELHO
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!;-) > an

Re: [PATCHES] syntax error position "CREATE FUNCTION" bug fix

2004-03-18 Thread Tom Lane
Fabien COELHO <[EMAIL PROTECTED]> writes: >> 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!;-) We *can* do it, it's just a matter of the pain level. For instance we could have the main lexer save aside an indi

Re: [PATCHES] syntax error position "CREATE FUNCTION" bug fix

2004-03-18 Thread Tom Lane
Attached is a proposed patch that fixes the cursor-position-in-CREATE-FUNCTION issue per my earlier suggestion. Since I complained that your proposal was too grotty, it's only fair to throw this out to let people take potshots at it ;-). The main grottiness here is providing access to the executi

Re: [PATCHES] syntax error position "CREATE FUNCTION" bug fix

2004-03-19 Thread Fabien COELHO
Dear Tom, > Attached is a proposed patch that fixes the > cursor-position-in-CREATE-FUNCTION issue per my earlier suggestion. > > The re-parsing of the original command is simplistic but will handle all > normal cases. > [...] That's quite a demonstration;-) However, I still stick with my "bad"