Re: Changing DB ownership - Mailing list pgsql-general

From Christopher Murtagh
Subject Re: Changing DB ownership
Date
Msg-id 1060102712.1445.15.camel@mafalda.murtagh.name
Whole thread Raw
In response to Changing DB ownership  (Christopher Murtagh <christopher.murtagh@mcgill.ca>)
List pgsql-general
On Tue, 2003-08-05 at 11:11, Jimmie H. Apsey wrote:
> Why would you want to do that?

 Why would I want to change ownership of a database? I could think of
numerous reasons.

> Why not do it an easier way and dump the database and restore it into
> your new database?

 Because that would mean that the database would be down while I did
that. The users to whom I gave ownership to the DB already had
permissions on the tables in the DB. This meant no down time.

> There's got to be a lot of stuff to consider when doing something as
> radical as renaming a database.

 I didn't rename any database, nor do anything 'radical'. Please re-read
my message and you'll see.

 This SQL query:

UPDATE pg_database SET datdba = 504 WHERE datname='chris';

 is obviously simpler than a pg_dump, dropdb, createdb, pg_restore.

Cheers,

Chris

--

Christopher Murtagh
Webmaster / Sysadmin
Web Communications Group
McGill University
Montreal, Quebec
Canada

Tel.: (514) 398-3122
Fax:  (514) 398-2017



pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: plPHP -- sort of an announcement.. but not commercial
Next
From: "scott.marlowe"
Date:
Subject: Re: plPHP -- sort of an announcement.. but not commercial