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

From Mike Mascari
Subject Re: Could not create a table named "USER" under postgreSQL
Date
Msg-id 41239EC8.9030107@mascari.com
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 wrote:

> Hello,
>
> 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?

You'll have to quote it in all the SQL you use if you insist on
using it:

[test@lexus] create table user (key integer);
ERROR:  syntax error at or near "user" at character 14
[test@lexus] create table "user" (key integer);
CREATE TABLE
[test@lexus] insert into user values (1);
ERROR:  syntax error at or near "user" at character 13
[test@lexus] insert into "user" values (1);

HTH,

Mike Mascari


pgsql-general by date:

Previous
From: Dino Vliet
Date:
Subject: can postgresql handle these large tables
Next
From: Andrew Rawnsley
Date:
Subject: Re: Postgresql feature