On Fri, 10 Aug 2001, Susan Lane wrote:
>Question - is there a way to change the owner of a postgres database after
>it's been created? I know I can alter table info, but is there something
>to do this for the db?
Look at the pg_database system catalog. Specifically, the datdba column.
It should be the PostgreSQL UID of the user who owns it.
For example:
lx=# SELECT datname, datdba FROM pg_database
lx-# INNER JOIN pg_user ON (datdba=usesysid);
datname | datdba
--------------+--------
postgres | 507
twig2 | 501
template0 | 507
Regards,
Jw.
--
jlx@commandprompt.com by way of pgsql-general@commandprompt.com