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 |
Thread: | |
Lists: | pgsql-bugs |
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
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2000-08-30 00:09:57 | Re: table aliases with updates |
Previous Message | pgsql-bugs | 2000-08-29 23:17:34 | Cannot create tabel named 'user' |