|
postgresql odd behavior
i have to enclose table user with " " but not for other tables..
this applies even in programs that access this database..
mydb=# \d
List of relations
Name | Type | Owner
---------------------+----------+----------
category | table | postgres
category_id_seq | sequence | postgres
content | table | postgres
content_field | table | postgres
content_type | table | postgres
content_type_id_seq | sequence | postgres
object_id_seq | sequence | postgres
rating | table | postgres
relationship | table | postgres
relationship_type | table | postgres
user | table | postgres
(11 rows)
mydb=# select * from user;
ERROR: parser: parse error at or near "user"
ERROR: parser: parse error at or near "user"
mydb=# select * from rating;
relationship_id | rating
-----------------+--------
128 | 3
(1 row)
mydb=# select * from "user";
user_id | username | first_names | last_name | email | password
---------+----------+-------------+-----------+-----------------------+----------
any idea?
k..... looks like 'user' is keyword of postgresql..
users works fine..
=)
Last edited by doublefailure; 08-28-2002 at 12:17 AM.
|