Re: [HACKERS] Syntax error and reserved keywords

2012-03-16 Thread Dimitri Fontaine
Peter Eisentraut pete...@gmx.net writes: Is there a reason for us not to add an HINT: user is a reserved keyword or something like that, other than nobody having been interested in doing the work? If that were easily possible, we could just recognize 'user' as an identifier in this context

Re: [HACKERS] Syntax error and reserved keywords

2012-03-16 Thread Heikki Linnakangas
On 16.03.2012 14:50, Dimitri Fontaine wrote: Peter Eisentrautpete...@gmx.net writes: Is there a reason for us not to add an HINT: user is a reserved keyword or something like that, other than nobody having been interested in doing the work? If that were easily possible, we could just

Re: [HACKERS] Syntax error and reserved keywords

2012-03-16 Thread Tom Lane
Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: Accepting the keyword in such a context seems much harder to me than providing a hint. To accept the keyword, you'd need a lot of changes to the grammar, but for the hint, you just need some extra code in yyerror(). Mind you, if

[HACKERS] Syntax error and reserved keywords

2012-03-14 Thread Dimitri Fontaine
Hi, A colleague came to me to express his surprise about this quite simple use case: =# alter table toto add column user text; ERROR: syntax error at or near user LINE 1: alter table toto add column user text; Is there a reason for us not to add an HINT: user is a reserved keyword or

Re: [HACKERS] Syntax error and reserved keywords

2012-03-14 Thread Pavel Stehule
2012/3/14 Dimitri Fontaine dimi...@2ndquadrant.fr: Hi, A colleague came to me to express his surprise about this quite simple use case:  =# alter table toto add column user text;  ERROR:  syntax error at or near user  LINE 1: alter table toto add column user text; Is there a reason for

Re: [HACKERS] Syntax error and reserved keywords

2012-03-14 Thread Euler Taveira
On 14-03-2012 10:58, Dimitri Fontaine wrote: Is there a reason for us not to add an HINT: user is a reserved keyword or something like that, other than nobody having been interested in doing the work? AFAIK, there is no such warning message in the code. If you're volunteering to do it, please

Re: [HACKERS] Syntax error and reserved keywords

2012-03-14 Thread Pavel Stehule
2012/3/14 Pavel Stehule pavel.steh...@gmail.com: 2012/3/14 Dimitri Fontaine dimi...@2ndquadrant.fr: Hi, A colleague came to me to express his surprise about this quite simple use case:  =# alter table toto add column user text;  ERROR:  syntax error at or near user  LINE 1: alter table

Re: [HACKERS] Syntax error and reserved keywords

2012-03-14 Thread Peter Eisentraut
On ons, 2012-03-14 at 14:58 +0100, Dimitri Fontaine wrote: A colleague came to me to express his surprise about this quite simple use case: =# alter table toto add column user text; ERROR: syntax error at or near user LINE 1: alter table toto add column user text; Is there a