Re: [ADMIN] changing ownership of db

2003-07-31 Thread Benjamin Thelen (CCGIS)
Thanks very much!! I had a user who was allowed to create dbs, but wasn't superuser...Now I just have a superuser. Benjamin Devrim GUNDUZ wrote: Hi, On Tue, 29 Jul 2003, Benjamin Thelen (CCGIS) wrote: I would like to change the ownership of a database. The only thing I could find up to now,

Re: [ADMIN] changing ownership of db

2003-07-30 Thread Colin 't Hart
On Tue, 29 Jul 2003 17:41:08 -0400, Tom Lane wrote: > Devrim GUNDUZ <[EMAIL PROTECTED]> writes: >> On Tue, 29 Jul 2003, Benjamin Thelen (CCGIS) wrote: >>> I would like to change the ownership of a database. > >> UPDATE pg_database SET datdba=(SELECT usesysid FROM pg_shadow WHERE >> usename='new_

Re: [ADMIN] changing ownership of db

2003-07-29 Thread Tom Lane
Devrim GUNDUZ <[EMAIL PROTECTED]> writes: > On Tue, 29 Jul 2003, Benjamin Thelen (CCGIS) wrote: >> I would like to change the ownership of a database. > UPDATE pg_database SET datdba=(SELECT usesysid FROM pg_shadow WHERE > usename='new_owner') WHERE datname='db_name'; That is all you need to do

Re: [ADMIN] changing ownership of db

2003-07-29 Thread Devrim GUNDUZ
Hi, On Tue, 29 Jul 2003, Benjamin Thelen (CCGIS) wrote: > I would like to change the ownership of a database. The only thing I > could find up to now, is that it is difficult, but I couldn't find any > detailed help. Connect to that database via psql. Then, first, update pg_database: UPDAT

[ADMIN] changing ownership of db

2003-07-29 Thread Benjamin Thelen (CCGIS)
hello, I would like to change the ownership of a database. The only thing I could find up to now, is that it is difficult, but I couldn't find any detailed help. Does anybody know how to do this!? Probably create a dump, then create a new db, then import all the data? thanks in advance, Benja