Re: Changing DB ownership

From: "Jimmie H(dot) Apsey" <japsey(at)futuredental(dot)com>
To: "Christopher Murtagh" <christopher(dot)murtagh(at)mcgill(dot)ca>
Cc: "postgres general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Changing DB ownership
Date: 2003-08-05 15:11:08
Message-ID: 3F2FC90C.5040007@futuredental.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

I am a developer of dental computer systems using Postgres within Red
Hat Advanced Server 2.1.

Jim Apsey

Christopher Murtagh wrote:

> Dumb question maybe, but how does one change database ownership? I've
>tried several permutations of:
>
>ALTER DATABASE SET ("|'| )owner("|'| ) TO ("|'| )newowner("|'| );
>
>and I tried looking at pg_database and I *was* able to hack this (got a
>clue half way through writing this email... sorry):
>
>UPDATE pg_database SET datdba = 504 WHERE datname='chris';
>
>And that worked as expected, but I'm worried that I might have missed
>something somewhere else. Will the above UPDATE cause problems down the
>road?
>
>Any info/clue would be much appreciated. Thanks in advance.
>
>Cheers,
>
>Chris
>
>---------------------------(end of broadcast)---------------------------
>TIP 7: don't forget to increase your free space map settings
>
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-08-05 15:22:12 Re: like performance w/o wildcards.
Previous Message scott.marlowe 2003-08-05 14:45:17 Re: like performance w/o wildcards.