Unix Technical Forum

BUG #3709: Changing Table Owner

This is a discussion on BUG #3709: Changing Table Owner within the pgsql Bugs forums, part of the PostgreSQL category; --> The following bug has been logged online: Bug reference: 3709 Logged by: Vishesh Jain Email address: vishesh.jain@tcs.com PostgreSQL version: ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 12:11 PM
Vishesh Jain
 
Posts: n/a
Default BUG #3709: Changing Table Owner


The following bug has been logged online:

Bug reference: 3709
Logged by: Vishesh Jain
Email address: vishesh.jain@tcs.com
PostgreSQL version: 8
Operating system: Linux
Description: Changing Table Owner
Details:

I need to change the owner of some tables from postgres to 'self defined
owner'. Is there any such table where the change in the owner will be
reflected in all the tables? Or any such configuration file to do the same?
Or any ALTER statement?

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 12:11 PM
Moiz Kothari
 
Posts: n/a
Default Re: BUG #3709: Changing Table Owner

Hi Vishesh,

You can run a dynamic SQL to get all your table owner changed. Try doing
this :

login to your database with postgresql user and then

select 'alter table '|| tablename ||' owner to <self defined owner>;' from
pg_tables where schemaname = 'public';

copy the alter table statements and run it.

Regards,
Moiz Kothari



On 10/30/07, Vishesh Jain <vishesh.jain@tcs.com> wrote:
>
>
> The following bug has been logged online:
>
> Bug reference: 3709
> Logged by: Vishesh Jain
> Email address: vishesh.jain@tcs.com
> PostgreSQL version: 8
> Operating system: Linux
> Description: Changing Table Owner
> Details:
>
> I need to change the owner of some tables from postgres to 'self defined
> owner'. Is there any such table where the change in the owner will be
> reflected in all the tables? Or any such configuration file to do the
> same?
> Or any ALTER statement?
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>




--
Hobby Site : http://dailyhealthtips.blogspot.com

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:06 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com