user column name

Started by Peter Choeabout 23 years ago7 messagesgeneral
Jump to latest
#1Peter Choe
choepete@mindspring.com

is there a reason i can't use 'user' as a column name for a table?

Peter Choe

#2Arjen van der Meijden
acm@tweakers.net
In reply to: Peter Choe (#1)
Re: user column name

You can't use any of the reserved keywords, like user, table, etc.
Perhaps if you tried with "user" instead of user, but you'd better think
of a nicer name (userid will work by the way).

Arjen

Show quoted text

-----Oorspronkelijk bericht-----
Van: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] Namens Peter Choe
Verzonden: donderdag 6 februari 2003 18:55
Aan: pgsql-general@postgresql.org
Onderwerp: [GENERAL] user column name

is there a reason i can't use 'user' as a column name for a table?

Peter Choe

---------------------------(end of
broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to
majordomo@postgresql.org)

#3Stephan Szabo
sszabo@megazone23.bigpanda.com
In reply to: Peter Choe (#1)
Re: user column name

On Thu, 6 Feb 2003, Peter Choe wrote:

is there a reason i can't use 'user' as a column name for a table?

It's a reserved word. You can use it inside double quotes,
but you'll need to always refer to it as "user" then.

#4Dennis Gearon
gearond@cvc.net
In reply to: Stephan Szabo (#3)
Re: user column name

Is 'Usrs' reserved? I plan on using that in an installation.

2/6/2003 10:31:08 AM, Stephan Szabo <sszabo@megazone23.bigpanda.com> wrote:

Show quoted text

On Thu, 6 Feb 2003, Peter Choe wrote:

is there a reason i can't use 'user' as a column name for a table?

It's a reserved word. You can use it inside double quotes,
but you'll need to always refer to it as "user" then.

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

#5Stephan Szabo
sszabo@megazone23.bigpanda.com
In reply to: Dennis Gearon (#4)
Re: user column name

On Thu, 6 Feb 2003, Dennis Gearon wrote:

Is 'Usrs' reserved? I plan on using that in an installation.

It's not in the SQL92 list of reserved words and doesn't appear
to be currently so it should be safe.

#6Dennis Gearon
gearond@cvc.net
In reply to: Stephan Szabo (#5)
Re: user column name

Thank you VERY much, for the quick reply!

2/6/2003 11:24:14 AM, Stephan Szabo <sszabo@megazone23.bigpanda.com> wrote:

Show quoted text

On Thu, 6 Feb 2003, Dennis Gearon wrote:

Is 'Usrs' reserved? I plan on using that in an installation.

It's not in the SQL92 list of reserved words and doesn't appear
to be currently so it should be safe.

#7Robert Treat
xzilla@users.sourceforge.net
In reply to: Dennis Gearon (#4)
Re: user column name

No. for a list of reserved words check out
http://www.gtsm.com/cgi/psearch?page=sql-keywords-appendix.html

You'll note that PostgreSQL largely bases it's list of reserved on the
SQL 92 & 99 specs and I'd strongly recommend to all to avoid usage of
those words, it's one of the easiest things you can do to stay spec
compliant.

Robert Treat

Show quoted text

On Thu, 2003-02-06 at 13:59, Dennis Gearon wrote:

Is 'Usrs' reserved? I plan on using that in an installation.

2/6/2003 10:31:08 AM, Stephan Szabo <sszabo@megazone23.bigpanda.com> wrote:

On Thu, 6 Feb 2003, Peter Choe wrote:

is there a reason i can't use 'user' as a column name for a table?

It's a reserved word. You can use it inside double quotes,
but you'll need to always refer to it as "user" then.