Re: changing ownership of db - Mailing list pgsql-admin

From Colin 't Hart
Subject Re: changing ownership of db
Date
Msg-id pan.2003.07.30.09.17.06.78262@yahoo.com
Whole thread Raw
In response to Re: changing ownership of db  (Devrim GUNDUZ <devrim@gunduz.org>)
List pgsql-admin
On Tue, 29 Jul 2003 17:41:08 -0400, Tom Lane wrote:

> Devrim GUNDUZ <devrim@gunduz.org> 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 --- it's the only place CREATE DATABASE
> records the owner's identity.

Would it be an idea to encapsulate this as
ALTER DATABASE db_name SET OWNER = 'new_owner'

or something similar?

What syntax would be desired and would you accept a patch?

Cheers,

Colin

pgsql-admin by date:

Previous
From: "Anagha Joshi"
Date:
Subject: time precision.
Next
From: Stephan Szabo
Date:
Subject: Re: [SQL] time precision.