Change owner of all database objects

From: "Andrus" <eetasoft(at)online(dot)ee>
To: pgsql-general(at)postgresql(dot)org
Subject: Change owner of all database objects
Date: 2006-01-17 18:10:56
Message-ID: dqjc02$2j5q$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John Sidney-Woollett 2006-01-17 18:11:27 Re: Distance calculation
Previous Message Michael Fuhr 2006-01-17 18:09:14 Re: Distance calculation