Re: [HACKERS] User names cannot contain `-' - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] User names cannot contain `-'
Date
Msg-id 199804261411.KAA00141@candle.pha.pa.us
Whole thread Raw
In response to User names cannot contain `-'  ("Oliver Elphick" <olly@lfix.co.uk>)
List pgsql-hackers
>
> I have a bug reported on the Debian package of 6.3.2:
>
>  > videotapes=> grant all on tapes to www-data;
>  > ERROR:  aclparse: non-existent user "www"
>
> It is, in fact, impossible to create the user www-data:
>
>   template1=> create user www-data;
>   ERROR:  parser: parse error at or near "-"
>   template1=> create user 'www-data';
>   ERROR:  parser: parse error at or near "'"
>
> So there are two problems:
>
> 1. The error message
>
>      `ERROR:  aclparse: non-existent user "www"'
>
>    is incorrect.  The parser should actually object to the `-' character; it
>    appears to be silently dropping the `-data'.
>
> 2. The range of possible user names is not the same as the range of possible
>    Unix login names.  However, the manual pages do not define what characters
>    are valid.  The SQL standard is silent on this point; it simply regards
>    the current user name as an identifier supplied by the system. On the
>    other hand, it is clear that PostgreSQL regards a user name as an SQL
>    identifier, so that there is no distinction of case and no punctuation
>    characters are allowed.

We allow undercores, but not dashes.

--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

pgsql-hackers by date:

Previous
From: Peter T Mount
Date:
Subject: Re: [HACKERS] Re: [INTERFACES] retrieving varchar size
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Re: [INTERFACES] retrieving varchar size