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

Поиск
Список
Период
Сортировка
От Mike Mascari
Тема Re: Could not create a table named "USER" under postgreSQL
Дата
Msg-id 41239EC8.9030107@mascari.com
обсуждение исходный текст
Ответ на Could not create a table named "USER" under postgreSQL  (Ying Lu <ying_lu@cs.concordia.ca>)
Список 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 по дате отправления:

Предыдущее
От: Dino Vliet
Дата:
Сообщение: can postgresql handle these large tables
Следующее
От: Andrew Rawnsley
Дата:
Сообщение: Re: Postgresql feature