Re: [GENERAL] Change owner for all tables in a database in one batch

2013-03-06 Thread Alvaro Herrera
Alexander Farber escribió: > Is there maybe a one-liner for changing the ownership in 1 batch > or should I execute "alter table set owner to bukvy" one by one? The command REASSIGN OWNED changes ownership of all objects owned by a certain role. There's no way to restrict it to just tables,

[GENERAL] Change owner for all tables in a database in one batch

2013-03-06 Thread Alexander Farber
Hello, by accident I have wrong owner for all tables in my 8.4.13 database: bukvy=> select * from pg_tables where tableowner = 'skat'; schemaname | tablename | tableowner | tablespace | hasindexes | hasrules | hastriggers +