Lists: | Postg무지개 토토SQL : Postg무지개 토토SQL 메일 링리스트 : 2000-08-29 이후 PGSQL-BUGS 23:54 |
---|
From: | pgsql-bugs(at)postgresql(dot)org |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Cannot create tabel named 'user' |
Date: | 2000-08-29 23:17:34 |
Message-ID: | 200008292317.e7TNHYO90143@hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | Postg토토 캔SQL : Postg토토 캔SQL 메일 링리스트 : 2000-08-29 이후 PGSQL-BUGS 23:17 |
Roman Solomatin (roman(dot)solomatin(at)tele2(dot)ee) reports a bug with a severity of 3
The lower the number the more severe it is.
Short Description
Cannot create tabel named 'user'
Long Description
Cannot create a table named user no matter if the database is old or freshly created. It may be version specific, because I have PostgreSQL 6.5.3 and system administrator doesn't update it to 7.x version.
Sample Code
In psql:
template1=> create database new_database;
CREATEDB
template1=> \c new_database
connecting to new database: new_database
new_database=> create table user ( id int2 not null );
ERROR: parser: parse error at or near "user"
new_database=> create table users (id int2 not null );
CREATE
new_database=>
No file was uploaded with this report
From: | "Harry W(dot) Waddell" <waddell(at)caravan(dot)com> |
---|---|
To: | roman(dot)solomatin(at)tele2(dot)ee, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: Cannot create tabel named 'user' |
Date: | 2000-08-29 23:54:13 |
Message-ID: | Pine.NEB.4.10.10008291649550.4357-100000@scimitar.caravan.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | Postg무지개 토토SQL : Postg무지개 토토SQL 메일 링리스트 : 2000-08-29 이후 PGSQL-BUGS 23:54 |
User is a key word, so the psql parser gets confused when you try to do:
create table user (....
but
create table "user" (...
will work. All references to the table will have to be in quotes as well.
FWIW, I'd use a different table name. e.g. yoyodyne_user.
HW
On Tue, 29 Aug 2000 pgsql-bugs(at)postgresql(dot)org wrote:
> Roman Solomatin (roman(dot)solomatin(at)tele2(dot)ee) reports a bug with a severity of 3
> The lower the number the more severe it is.
>
> Short Description
> Cannot create tabel named 'user'
>
> Long Description
> Cannot create a table named user no matter if the database is old or freshly created. It may be version specific, because I have PostgreSQL 6.5.3 and system administrator doesn't update it to 7.x version.
>
> Sample Code
> In psql:
> template1=> create database new_database;
> CREATEDB
> template1=> \c new_database
> connecting to new database: new_database
> new_database=> create table user ( id int2 not null );
> ERROR: parser: parse error at or near "user"
> new_database=> create table users (id int2 not null );
> CREATE
> new_database=>
>
> No file was uploaded with this report
>
>
>