Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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                    

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)


pgsql-hackers by date

Next:From: Brett McCormickDate: 1998-04-26 07:16:42
Subject: ssl implementation questions
Previous:From: Bruce MomjianDate: 1998-04-26 04:05:40
Subject: Re: indexing words

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group