manipuliation the pg_shadow table

Started by Bob Powellover 23 years ago2 messagesgeneral
Jump to latest
#1Bob Powell
Bob@hotchkiss.org

Hi everyone,

Can anyone tell me if it is a problem to use the update command to change colunm values in the pg_shadow table?

UPDATE pg_shadow SET usesuper = 't' where usename = 'bob'

makes bob a superuser. Is this kind of thing OK? Thanks.

Bob Powell

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bob Powell (#1)
Re: manipuliation the pg_shadow table

"Bob Powell" <Bob@hotchkiss.org> writes:

Can anyone tell me if it is a problem to use the update command to change colunm values in the pg_shadow table?
UPDATE pg_shadow SET usesuper = 't' where usename = 'bob'
makes bob a superuser. Is this kind of thing OK? Thanks.

You can get away with it, but it's probably better to use ALTER USER.

regards, tom lane