Thread: pg_user, changing priviliges
I'm trying to give a createuser privilige by changing pg_users, i'm logged in as a superuser. mtldb=# select count(*) from pg_user where usename='mtluser'; count ------- 1 (1 row) mtldb=# update pg_user set usesuper=true, usecatupd=true where usename='mtluser'; UPDATE 0 Why I can't do it? tia Marcin Mazurek -- Kierownik Działu Systemowego MULTINET SA o/Poznan http://www.multinet.pl/
On Thu, Oct 26, 2000 at 08:24:56AM +0200, Marcin Mazurek wrote: > I'm trying to give a createuser privilige by changing pg_users, i'm logged > in as a superuser. > > > Why I can't do it? > reedstrm=> \d pg_user View = pg_user ... Because pg_user is a view on pg_shadow. Can't update a view. The right way to go about adding createuser privilage to a user is: ALTER USER foouser CREATEUSER; Ross -- Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu> NSBRI Research Scientist/Programmer Computer and Information Technology Institute Rice University, 6100 S. Main St., Houston, TX 77005
Marcin Mazurek writes: > I'm trying to give a createuser privilige by changing pg_users, i'm logged > in as a superuser. You need to change pg_shadow. -- Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/
Marcin Mazurek wrote: >I'm trying to give a createuser privilige by changing pg_users, i'm logged >in as a superuser. > >mtldb=# select count(*) from pg_user where usename='mtluser'; > count >------- > 1 >(1 row) > >mtldb=# update pg_user set usesuper=true, usecatupd=true where >usename='mtluser'; >UPDATE 0 > >Why I can't do it? pg_user is a view; you should be updating pg_shadow -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight http://www.lfix.co.uk/oliver PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47 GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C ======================================== "Whosoever therefore shall be ashamed of me and of my words in this adulterous and sinful generation; of him also shall the Son of man be ashamed, when he cometh in the glory of his Father with the holy angels." Mark 8:38