From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Sander Steffann <steffann(at)nederland(dot)net> |
Cc: | japsey(at)futuredental(dot)com, Christopher Murtagh <christopher(dot)murtagh(at)mcgill(dot)ca>, postgres general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Changing DB ownership |
Date: | 2003-08-06 23:35:58 |
Message-ID: | 200308062335.h76NZwa23746@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Added to TODO, to match ALTER TABLE ... OWNER:
o Add ALTER DATABASE ... OWNER TO newowner
---------------------------------------------------------------------------
Sander Steffann wrote:
> Hi,
>
> > Why would you want to do that?
> >
> > Why not do it an easier way and dump the database and restore it into
> > your new database?
> >
> > There's got to be a lot of stuff to consider when doing something as
> > radical as renaming a database.
>
> He is not talking about renaming his database, he is talking about changing
> the OWNER of the database.
>
> > >UPDATE pg_database SET datdba = 504 WHERE datname='chris';
>
> This is how I change the owner of the database too. It's not that diffucult,
> but it would be nice if it could be changed using an ALTER statement.
>
> I have noticed in the past that the dumps produced by pg_dump are difficult to
> restore if the datdba you change to has no rights to create databases. I
> haven't tested this with recent releases though. I suspect that this has
> already been fixed in pg_dump.
>
> Bye,
> Sander.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | DeJuan Jackson | 2003-08-06 23:47:02 | Re: ext3 block size |
Previous Message | Roberto M. | 2003-08-06 22:30:46 | Setting/Accessing Internal data |