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

From Oliver Elphick
Subject Re: [HACKERS] Re: User names cannot contain `-'
Date
Msg-id 199804281547.QAA25257@linda.lfix.co.uk
Whole thread Raw
In response to Re: [HACKERS] Re: User names cannot contain `-'  (The Hermit Hacker <scrappy@hub.org>)
List pgsql-hackers
The Hermit Hacker wrote:
  >> template1=> select usename, usesysid, valuntil from pg_shadow;
  >> usename |usesysid|valuntil
  >> --------+--------+----------------------------
  >> postgres|      31|Sat Jan 31 00:00:00 2037 CST
  >> www-data|      33|Sat Jan 31 00:00:00 2037 CST
  >...
  >
  >    This might have already been gone over, but if this was an upgrade
  >from a previous release, its possible that this was created with a
  >'dump/reload'?

Createuser does not use the CREATE USER command.  It updates the
system tables directly.  This enables it to be used to specify a user id,
which CREATE USER does not allow.  However, it also allows inconsistencies
to arise, as here. So createuser can put in user names that CREATE USER
cannot and that GRANT does not recognise.

--
Oliver Elphick                                Oliver.Elphick@lfix.co.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)



pgsql-hackers by date:

Previous
From: "Oliver Elphick"
Date:
Subject: Re: [HACKERS] Re: Bug#21681: postgresql: Doesn't allow granting to www-data
Next
From: Andreas Zeugswetter
Date:
Subject: AW: [HACKERS] Re: Bug#21681: postgresql: Doesn't allow granting to www-data