Re: Changing ownership of objects

From: "Joshua b(dot) Jore" <josh(at)greentechnologist(dot)org>
To: Peter Darley <pdarley(at)kinesis-cem(dot)com>
Cc: Pgsql-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Changing ownership of objects
Date: 2002-05-28 23:06:36
Message-ID: Pine.BSO.4.44.0205281802530.22748-100000@kitten.greentechnologist.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

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(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-05-28 23:08:49 Re: How to cripple a postgres server
Previous Message Tom Lane 2002-05-28 22:47:59 Re: Changing ownership of objects

Browse pgsql-novice by date

  From Date Subject
Next Message Rory Campbell-Lange 2002-05-29 09:18:14 Fantasy Football complex select
Previous Message Tom Lane 2002-05-28 22:47:59 Re: Changing ownership of objects