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

Reply via email to