Re: [ADMIN] How to change all owners on all objects in a schema

2011-06-23 Thread Greg Spiegelberg
On Thu, Jun 23, 2011 at 2:41 PM, Kevin Grittner wrote: > "Kevin Grittner" wrote: > > > || ' set schema newschema;' > > Oops; you wanted to change the owner, but I'll leave that as an > exercise for the reader. :-) > > Beat me to it :) Replace , and psql -qAt -d -c "SELECT 'AL

Re: [ADMIN] How to change all owners on all objects in a schema

2011-06-23 Thread Kevin Grittner
"Kevin Grittner" wrote: > || ' set schema newschema;' Oops; you wanted to change the owner, but I'll leave that as an exercise for the reader. :-) -Kevin -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgre

Re: [ADMIN] How to change all owners on all objects in a schema

2011-06-23 Thread Kevin Grittner
"Campbell, Lance" wrote: > PostgreSQL: 9.0.x > > How do I change the ownership of all objects within a schema from > X to Y? The objects within each schema would be tables and > sequences. I would use DO statements. What could be done as a one-liner to handle the tables is shown below with

[ADMIN] How to change all owners on all objects in a schema

2011-06-23 Thread Campbell, Lance
PostgreSQL: 9.0.x How do I change the ownership of all objects within a schema from X to Y? The objects within each schema would be tables and sequences. Thanks, Lance Campbell