From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr> |
Cc: | PostgreSQL-Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Syntax error and reserved keywords |
Date: | 2012-03-14 14:51:00 |
Message-ID: | CAFj8pRC9a++-JCNKL8FnV740yaAtA+XukSqCDohjrQcCdHNUEw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2012/3/14 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:
> 2012/3/14 Dimitri Fontaine <dimitri(at)2ndquadrant(dot)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 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?
>
> Probably nobody did this work. I am thinking so on current code, this
> request is relatively simple implemented - and I agree so this can be
> really nice feature.
>
but it is not too simple as I though
this message coming from scanner_yyerror - and forwarding hint into
this "callback" routine is not trivial - more - this message is used
when word is reserved keyword and must not be and when word is just
wrong reserved keyword.
Regards
Pavel
> Regards
>
> Pavel
>
>>
>> Regards,
>> --
>> Dimitri Fontaine
>> http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
>>
>> --
>> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-hackers
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2012-03-14 14:59:34 | Re: VALID UNTIL |
Previous Message | Tom Lane | 2012-03-14 14:46:26 | Re: Too many IO? |