Re: Column name 'user' not allowed?

From: gearond(at)fireserve(dot)net
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Column name 'user' not allowed?
Date: 2004-07-08 16:19:36
Message-ID: 200407081619.i68GJa95013963@phaze.fireserve.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I went through the frustration of that as well. I guess all people making libraries which use RDBMs should read the SQL spec (like that'll happen) so they don't use reserved words.

I changed all my use of the word user to 'usr'. Shortness is next to godliness. I made sure to change ALL occurrences so I didn't have to remeber to where I had changed.
Duane Lee - EGOVX <DLee(at)mail(dot)maricopa(dot)gov> wrote:

<wrote ---------------------------------------------------------->
"'Thomas Mueller'" <news-exp-dec04(at)tmueller(dot)com>, pgsql-general(at)postgresql(dot)org

Try putting USER in quotes like this "USER".

-----Original Message-----
From: Thomas Mueller [mailto:news-exp-dec04(at)tmueller(dot)com]
Sent: Wednesday, July 07, 2004 1:44 PM
To: pgsql-general(at)postgresql(dot)org
Subject: [GENERAL] Column name 'user' not allowed?

Hi,

I tried to install phpopenchat but I can't create this table:

poc=> CREATE TABLE poc_user_account (
poc(> USER varchar(255) NOT NULL,
poc(> PASSWORD varchar(255),
poc(> CONFIRM_CODE char(32),
poc(> DISABLED int NOT NULL DEFAULT '0',
poc(> KICKED int NOT NULL DEFAULT '0',
poc(> PASSWORD_NEW varchar(255),
poc(> PRIMARY KEY (USER)
poc(> );
ERROR: syntax error at or near "USER" at character 35

After searching a while what's wrong I renamed column USER to USER2 and
now I can create the table! I don't see a reason why column name USER
isn't allowed?!

I am running Postgres 7.4.2 on Linux.

Thanks!
</quote ----------------------------------------------------->

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2004-07-08 16:28:50 Re: enable thready safety on Mac OS X 10.3.4
Previous Message Timothy Perrigo 2004-07-08 14:28:16 Re: unexpected update behavior with temp tables