Re: Could not create a table named "USER" under postgreSQL - Mailing list pgsql-general

From Tom Lane
Subject Re: Could not create a table named "USER" under postgreSQL
Date
Msg-id 2948.1092855832@sss.pgh.pa.us
Whole thread Raw
In response to Could not create a table named "USER" under postgreSQL  (Ying Lu <ying_lu@cs.concordia.ca>)
List pgsql-general
Ying Lu <ying_lu@cs.concordia.ca> writes:
> I have a table named "USER" under MySQL database. When I am trying to
> move tables from MySQL to PostgreSQL, I found that I could not create a
> table namely "USER". I guess "USER" is a key string used by PostgreSQL
> system so that we could not create a table named "USER". Is that true?

USER is a synonym for CURRENT_USER, as required by the SQL standard
(as far back as SQL92).  So yes, it's a reserved word.  You could
double-quote it if you really want to use it as an identifier.

            regards, tom lane

pgsql-general by date:

Previous
From: Arthur van Dorp
Date:
Subject: Re: Web application: Programming language/Framework: Summary
Next
From: Tom Lane
Date:
Subject: Re: Could not create a table named "USER" under postgreSQL