Re: [HACKERS] Syntax error reporting (was Re: [PATCHES] syntax error position

2004-03-22 Thread Fabien COELHO
Dear Tom, The point is that CONTEXT is essentially a record of how we got here. Yes, but for human eyes. In a situation where the actual error occurs inside a couple of levels of nesting, you want to be able to report the outer queries as well as the one that directly caused the error. I

Re: [HACKERS] Syntax error reporting (was Re: [PATCHES] syntax error position CREATE FUNCTION bug fix)

2004-03-22 Thread Tom Lane
Fabien COELHO [EMAIL PROTECTED] writes: More over, I have other ideas for CONTEXT, which should really be a stack. It already is a stack. Ok, I agree that there is a push, but I'm still looking fot the pop. Maybe I missed something, but it seemed to me that strings are appended on to the

Re: [HACKERS] Syntax error reporting (was Re: [PATCHES] syntax error position CREATE FUNCTION bug fix)

2004-03-21 Thread Tom Lane
Fabien COELHO [EMAIL PROTECTED] writes: I agree with you that both reports should not look the same. The good news is that they already do not look the same, thanks to the CONTEXT information. Right, but you quite properly didn't like my quick-hack to psql that assumes that the presence of

Re: [HACKERS] Syntax error reporting (was Re: [PATCHES] syntax error position

2004-03-20 Thread Fabien COELHO
Dear Tom, However, I still stick with my bad simple idea because the simpler the better, and also because of the following example: ... psql SELECT count_tup('pg_shadow'); ERROR: syntax error at or near FRM at character 22 CONTEXT: PL/pgSQL function count_tup line 4 at for over

[HACKERS] Syntax error reporting (was Re: [PATCHES] syntax error position CREATE FUNCTION bug fix)

2004-03-19 Thread Tom Lane
[ moving thread to hackers ] Fabien COELHO [EMAIL PROTECTED] writes: However, I still stick with my bad simple idea because the simpler the better, and also because of the following example: ... psql SELECT count_tup('pg_shadow'); ERROR: syntax error at or near FRM at character 22 CONTEXT: