Search Postgresql Archives

Re: Changing database owner (7.4)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Joshua D. Drake wrote:
Steve Crawford wrote:
Changing the owner of a database is easy in 8.x (alter database...) but seems less so in 7.4.

Is there a method of safely changing the owner of the database (via command or via updating pg* tables) in 7.4?

Use a transaction and use update to pg_database

So just to be sure I don't mess this up...

1: Connect to server as user postgres database template1.
2: "update pg_database set datdba=1 where datname='my_db_name';"

By transaction are you suggesting wrapping the whole thing in a begin/commit pair and reviewing the changes before a commit?

Also, do I need to be concerned about changing datacl (or any other column) or just use the normal grant procedure for that?

Cheers,
Steve


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux