impersonating a user/ownership problems - Mailing list pgsql-general

From Ivan Sergio Borgonovo
Subject impersonating a user/ownership problems
Date
Msg-id 20091117173609.5fb482c0@dawn.webthatworks.it
Whole thread Raw
List 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


pgsql-general by date:

Previous
From: Konstantin Izmailov
Date:
Subject: Re: passing parameters to multiple statements
Next
From: Merlin Moncure
Date:
Subject: build array of composites in SPI