User names

From: "Glen and Rosanne Eustace" <agree(at)godzone(dot)net(dot)nz>
To: <pgsql-general(at)postgresql(dot)org>
Subject: User names
Date: 2000-12-13 17:34:33
Message-ID: 01f401c0652a$f5af1da0$0101a8c0@godzone.net.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Hi,
I came across an anomaly yesterday which I would like clarified. I am using
6.5.3 but I don't know whether this is version specific.

I created a new db user with a name that was 14 characters long, I allowed
createuser to also create a dbase of the dame name. So far so good. There
is no corresponding unix user so everything seemed fine.

I then tried to add this user to an existing pg_passwd file. I didn't get
an error, but it didn't add it either. What pg_passwd did do was to truncate
the name to 8 characters, it then found an existing user as the root of my
long name is an existing unix/postgres user and changed the password for
that entry. This isn't what I wanted to happen. After some experimentation
I found that I could add a user xxx to the file with pg_passwd and then edit
the file and change the xxx to the correct 14 character name.

Is there a defined max length for postgreSQL user names ?
If there is and it is 8, then createuser should enforce it.
If the length is > 8 then pg_passwd needs fixing so that it doesn't
truncate.

In either case, a message should have been given rather than the silent
truncation, as it had me foxed for a while as to why my new user couldn't
use the database and the existing user couldn't either.
--
Glen and Rosanne Eustace,
GodZone Internet Services, a division of AGRE Enterprises Ltd.,
P.O. Box 8020, Palmerston North, New Zealand
Ph: +64 6 357 8168, Mobile: +64 21 424 015

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2000-12-13 17:58:12 Re: No postgres on Solaris
Previous Message Tom Lane 2000-12-13 17:08:07 Re: Postgres failover implementation

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2000-12-13 17:58:12 Re: No postgres on Solaris
Previous Message D=?ISO-8859-1?Q?=C5?= 2000-12-13 17:16:04 DB Algorithm Essay, please help