User names cannot contain `-'

From: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
To: pgsql-hackers(at)postgresql(dot)org
Cc: jgoerzen(at)complete(dot)org
Subject: User names cannot contain `-'
Date: 1998-04-26 06:02:09
Message-ID: 199804260702.IAA03050@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Is it possible to make the parser accept the full range of Unix login names,
including some punctuation characters and upper- and lower-case letters?

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver

PGP key from public servers; key ID 32B8FAA1

========================================
Come to me, all you who labour and are heavily laden, and I will
give you rest. Take my yoke upon you, and learn from me; for I am
meek and lowly in heart, and you shall find rest for your souls.
For my yoke is easy and my burden is light. (Matthew 11: 28-30)

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Brett McCormick 1998-04-26 07:16:42 ssl implementation questions
Previous Message Bruce Momjian 1998-04-26 04:05:40 Re: indexing words