impersonating a user/ownership problems

From: Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>
To: pgsql-general(at)postgresql(dot)org
Subject: impersonating a user/ownership problems
Date: 2009-11-17 16:36:09
Message-ID: 20091117173609.5fb482c0@dawn.webthatworks.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I've several schemas each one is owned by a user.
Then there are websites sharing the same code base using different
schemas and connecting with different users.

When I have to refactor I generally have to make the same changes
for all the schemas.

I log in as a user that have enough right to all schemas and apply
the changes.

Since I've to make all the changes to all schemas I can't apply
changes to each schema with different connections.

But this ends up in writing a lot of code for altering ownership of
objects and eg. turning an int into a serial becomes particularly
painful.

create sequence
alter table ... owner to
alter sequence ... owned by ...
alter table ... set default ...

Is there a less painful approach?

--
Ivan Sergio Borgonovo
http://www.webthatworks.it

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2009-11-17 17:10:02 build array of composites in SPI
Previous Message Konstantin Izmailov 2009-11-17 16:33:05 Re: passing parameters to multiple statements