pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
change username
3+ messages / 3 participants
[nested] [flat]

* change username
@ 1998-12-28 18:15  Bill Brandt <brandtwr-pgsql@draaw.net>
  0 siblings, 1 reply; 3+ messages in thread

From: Bill Brandt @ 1998-12-28 18:15 UTC (permalink / raw)
  To: 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?

-- 
Bill Brandt                                   
brandtwr@draaw.net                              http://www.draaw.net/



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [SQL] change username
@ 1998-12-28 20:19  Jan Wieck <jwieck@debis.com>
  parent: Bill Brandt <brandtwr-pgsql@draaw.net>
  0 siblings, 0 replies; 3+ messages in thread

From: jwieck@debis.com @ 1998-12-28 20:19 UTC (permalink / raw)
  To: brandtwr-pgsql@draaw.net; +Cc: 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) #




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [SQL] change username
@ 1998-12-29 00:03  David Hartwig <daybee@bellatlantic.net>
  0 siblings, 0 replies; 3+ messages in thread

From: David Hartwig @ 1998-12-29 00:03 UTC (permalink / raw)
  To: Bill Brandt <brandtwr-pgsql@draaw.net>; pgsql-sql

Pg_user is a view.   Non-updatable I might add.    Pg_shadow is the table
you want.

----- Original Message -----
From: Bill Brandt <brandtwr-pgsql@draaw.net>
To: <pgsql-sql@postgreSQL.org>
Sent: Monday, December 28, 1998 1:15 PM
Subject: [SQL] change username


>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?
>
>--
>Bill Brandt
>brandtwr@draaw.net                              http://www.draaw.net/
>




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~1998-12-29 00:03 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-12-28 18:15 change username Bill Brandt <brandtwr-pgsql@draaw.net>
1998-12-28 20:19 ` Jan Wieck <jwieck@debis.com>
1998-12-29 00:03 Re: [SQL] change username David Hartwig <daybee@bellatlantic.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox