Re: Valid role name (PostgreSQL 9.0.4)
| От | Josh Kupershmidt |
|---|---|
| Тема | Re: Valid role name (PostgreSQL 9.0.4) |
| Дата | |
| Msg-id | BANLkTin6+r06N+FMeaE3=ujEu8o-hXRpHA@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Valid role name (PostgreSQL 9.0.4) (Grzegorz Szpetkowski <gszpetkowski@gmail.com>) |
| Список | pgsql-novice |
On Fri, Apr 8, 2011 at 10:11 AM, Grzegorz Szpetkowski
<gszpetkowski@gmail.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
В списке pgsql-novice по дате отправления: