From: | Josh Kupershmidt <schmiddy(at)gmail(dot)com> |
---|---|
To: | Grzegorz Szpetkowski <gszpetkowski(at)gmail(dot)com> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Valid role name (PostgreSQL 9.0.4) |
Date: | 2011-04-08 21:39:17 |
Message-ID: | BANLkTin6+r06N+FMeaE3=ujEu8o-hXRpHA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On Fri, Apr 8, 2011 at 10:11 AM, Grzegorz Szpetkowski
<gszpetkowski(at)gmail(dot)com> wrote:
> Since USER is reserved PostgreSQL keywords should I generally avoid
> such names ?
I would avoid creating user names and other identifiers (names of
functions, schemas, databases, tables, etc.) which collide with
reserved words.
> I found that I can even create (distinct) "USER" role:
>
> createuser -SdR USER
> psql -c "\du"
> List of roles
> Role name | Attributes | Member of
> -----------+-----------------------------------+-----------
> USER | Create DB | {}
> postgres | Superuser, Create role, Create DB | {}
> user | Create DB | {}
Yup; from:
<http://www.postgresql.org/docs/9.0/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS>
"Quoting an identifier also makes it case-sensitive, whereas
unquoted names are always folded to lower case."
Josh
From | Date | Subject | |
---|---|---|---|
Next Message | Saseendra Babu | 2011-04-11 08:04:37 | 'Range partitioning in PGSQL' |
Previous Message | Grzegorz Szpetkowski | 2011-04-08 14:11:01 | Re: Valid role name (PostgreSQL 9.0.4) |