Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: change ownership on all tables


  • From: John R Pierce <pierce(at)hogranch(dot)com>
  • To: Alan McKay <alan(dot)mckay(at)gmail(dot)com>
  • Cc: Postgres General Postgres General <pgsql-general(at)postgresql(dot)org>
  • Subject: Re: change ownership on all tables
  • Date: Fri, 31 Jul 2009 11:57:12 -0700
  • Message-id: <4A733E88.2010905@hogranch.com> <text/plain>

Alan McKay wrote:
OK, my DB Admin is on vacation, and 15 minutes of googling didn't get
me the answer :-)

Although in that 15 minutes I could have done all 109 tables manually :-)

I know this command for a single table, and checked the manual but
don't see anything about wildcards

ALTER TABLE tablename OWNER to user;

see http://pgedit.com/public/sql/acl_admin/index.html
or http://www.archonet.com/pgdocs/grant-all.html

these are scripts for doing a GRANT to all objects, but they should easily be modifiable to do a ALTER TABLE... OWNER





Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group