Re: can't create user collumn

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: loki <loigu(at)centrum(dot)cz>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: can't create user collumn
Date: 2006-03-17 16:40:02
Message-ID: 20060317083626.L36967@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Fri, 17 Mar 2006, loki wrote:

> Hi,
> i'm just starting with postgres DB, but this looks very strange to me:
>
> If i try to create table with collumn user, it fails with error:
> create exec error:ERROR: syntax error at or near "user" at character 368

USER is a reserved word in SQL and as such cannot be used as a non-quoted
identifier so "user" (with the quotes) should work, however you'd probably
have to use the quotes in all cases. Technically, we allow some reserved
words as non-quoted identifiers in some places, however to be compliant to
spec you cannot use any of the reserved words that way.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kenneth Downs 2006-03-17 16:51:35 Re: pgsql variables from records
Previous Message SunWuKung 2006-03-17 16:37:30 Re: pgsql variables from records