Re: How Do I Change The 'Owner' of a Database? - Mailing list pgsql-general

From Steven Klassen
Subject Re: How Do I Change The 'Owner' of a Database?
Date
Msg-id 20041012210758.GA22225@commandprompt.com
Whole thread Raw
In response to How Do I Change The 'Owner' of a Database?  (pw <p.willis@telus.net>)
Responses Re: How Do I Change The 'Owner' of a Database?
List pgsql-general
* pw <p.willis@telus.net> [2004-10-12 13:48:30 -0700]:

> How can I cahnge the owner of the database to the proper user?

UPDATE pg_database SET datdba = (SELECT usesysid FROM pg_user WHERE
usename = 'user_name') WHERE datname = 'database_name;

There might be something you can do with 'alter database' as well.

--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http://www.commandprompt.com/
PostgreSQL Replication & Support Services, (503) 667-4564

pgsql-general by date:

Previous
From: David Siebert
Date:
Subject: Re: OS not good for database
Next
From: pw
Date:
Subject: Re: How Do I Change The 'Owner' of a Database?