Re: Database Ownership - Mailing list pgsql-novice

From Josh Berkus
Subject Re: Database Ownership
Date
Msg-id 200205291612.17692.josh@agliodbs.com
Whole thread Raw
In response to Database Ownership  ("Jillian Carroll" <jillian@koskie.com>)
List pgsql-novice
Jillian,

> How can I change ownership of a db to another user once it's been created?

The best way, really, is to pg_dump the database, drop it, and re-create it
under the new user.

You can change the owner by hacking the pg_database and pg_class tables.
However, this is fraught with potential fatal errors, so I'm not going to
attempt to describe it.

--
-Josh Berkus

______AGLIO DATABASE SOLUTIONS___________________________
                                        Josh Berkus
   Complete information technology     josh@agliodbs.com
    and data management solutions     (415) 565-7293
   for law firms, small businesses      fax 621-2533
    and non-profit organizations.     San Francisco


pgsql-novice by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Database Ownership
Next
From: Ron Johnson
Date:
Subject: [Fwd: Re: CPU types and queries...]