BUG #3709: Changing Table Owner

Started by Vishesh Jainover 18 years ago2 messagesbugs
Jump to latest
#1Vishesh Jain
vishesh.jain@tcs.com

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?

#2Moiz Kothari
moizpostgres@gmail.com
In reply to: Vishesh Jain (#1)
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