Re: How Do I Change The 'Owner' of a Database?

From: Steven Klassen <sklassen(at)commandprompt(dot)com>
To: pw <p(dot)willis(at)telus(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How Do I Change The 'Owner' of a Database?
Date: 2004-10-12 21:07:58
Message-ID: 20041012210758.GA22225@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

* pw <p(dot)willis(at)telus(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message pw 2004-10-12 21:11:51 Re: How Do I Change The 'Owner' of a Database?
Previous Message Gaetano Mendola 2004-10-12 21:04:02 Re: Change query priority