Re: Could not create a table named "USER" under postgreSQL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ying Lu <ying_lu(at)cs(dot)concordia(dot)ca>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Could not create a table named "USER" under postgreSQL
Date: 2004-08-18 19:03:52
Message-ID: 2948.1092855832@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ying Lu <ying_lu(at)cs(dot)concordia(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Arthur van Dorp 2004-08-18 19:03:55 Re: Web application: Programming language/Framework: Summary
Previous Message Ying Lu 2004-08-18 19:03:02 Re: Could not create a table named "USER" under postgreSQL