Thread: user column name

user column name

From
Peter Choe
Date:
is there a reason i can't use 'user' as a column name for a table?

Peter Choe



Re: user column name

From
Arjen van der Meijden
Date:
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

> -----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)
>



Re: user column name

From
Stephan Szabo
Date:
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.



Re: user column name

From
Dennis Gearon
Date:
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.
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>




Re: user column name

From
Stephan Szabo
Date:
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.


Re: user column name

From
Dennis Gearon
Date:
Thank you VERY much, for the quick reply!

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

>
>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.
>
>




Re: user column name

From
Robert Treat
Date:
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

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.
> >
>