Change owner of all database objects - Mailing list pgsql-general

From Andrus
Subject Change owner of all database objects
Date
Msg-id dqjc02$2j5q$1@news.hub.org
Whole thread Raw
Responses Re: Change owner of all database objects  (Richard Huxton <dev@archonet.com>)
List pgsql-general
Currently all my database objects are owned by superuser postgres .

I need to change owner to a nonprivileged role for all objects in a
database.

I'm using Postgres 8.1 server and client in Windows XP, only plpSQL language
installed in server.

I'm thinking about the following possibilities:

1. Create a loop over all database objects and issue change owner statements
2. Update system tables.
3. Make database dump and restore
4. make text dump and run some global find/replace. I'm not sure which
utility can handle it in windows

Is there any sample how to do it in Windows ?

Andrus.



pgsql-general by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: Distance calculation
Next
From: Marcin
Date:
Subject: Re: Huge number of disk writes after migration to 8.1