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

Re: Syntax error and reserved keywords

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
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 20:30:50
Message-ID: 1331757050.22638.0.camel@vanquo.pezone.net (view raw or flat)
Thread:
Lists: pgsql-hackers
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 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 and avoid the issue altogether.  But it's
not.


In response to

Responses

pgsql-hackers by date

Next:From: Peter EisentrautDate: 2012-03-14 20:31:49
Subject: Re: CREATE FOREGIN TABLE LACUNA
Previous:From: Merlin MoncureDate: 2012-03-14 20:10:29
Subject: Re: Faster compression, again

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