Re: [SQL] change username
| От | jwieck@debis.com (Jan Wieck) |
|---|---|
| Тема | Re: [SQL] change username |
| Дата | |
| Msg-id | m0zuj8x-000EBPC@orion.SAPserv.Hamburg.dsh.de обсуждение исходный текст |
| Ответ на | change username (Bill Brandt <brandtwr-pgsql@draaw.net>) |
| Список | pgsql-sql |
>
> I have a user on my system whose username has recently changed. The user
> owns and is a non-owning user of multiple database. I have tried a command
> of the form:
>
> update pg_user set usename='newname' where usesysid=###;
>
> When I try this I get an error. Does anyone know how to change this
> information? If I delete the user and recreate the user with the same uid
> does that retain all the existing database permissions?
pg_user is a system view. Update pg_shadow instead.
But what error do you get? The command should respond with
"UPDATE 0" and do nothing!
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#======================================== jwieck@debis.com (Jan Wieck) #
В списке pgsql-sql по дате отправления: