Re: Changing ownership of objects - Mailing list pgsql-general

From Joshua b. Jore
Subject Re: Changing ownership of objects
Date
Msg-id Pine.BSO.4.44.0205281802530.22748-100000@kitten.greentechnologist.org
Whole thread Raw
In response to Changing ownership of objects  ("Peter Darley" <pdarley@kinesis-cem.com>)
List pgsql-general
I can't answer your question with code but you should be able to alter the
system classes. Other tables will link their owner id (and integer) to
pg_users.usesysid. Just alter which user the object point to and viola!
reassignment.

Joshua b. Jore ; http://www.greentechnologist.org ; 10012 11010 11022
10202 1012 2122 11020 10202 10202 11002 1020 1012 11102 11102 11102 1201
11001 11002 10211 11020 10202 10202 11002 11021 1201 11010 11020 10211

On Tue, 28 May 2002, Peter Darley wrote:

> Friends,
>     When I was young and foolish and setting up my DB initially I ended up with
> the objects in my DB owned by random users.  I'd like to write a script to
> change the user for all objects to be the same, but I don't see any way to
> change the ownership of sequences.  Any ideas?
> Thanks,
> Peter Darley
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Changing ownership of objects
Next
From: Tom Lane
Date:
Subject: Re: Invalid length of startup packet