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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-hackers by date

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