Horje
postgres alter owner of all tables Code Example
postgres alter table owner
ALTER TABLE <TABLE class="w3-table w3-striped w3-bordered w3-border w3-white"name> OWNER TO <username>
postgres alter owner of all tables

#TABLES
for tbl in `psql -qAt -c "select tablename from pg_tables where schemaname = 'public';" YOUR_DB` ; do  psql -c "alter table \"$tbl\" owner to NEW_OWNER" YOUR_DB ; done

#SEQUENCES
for tbl in `psql -qAt -c "select sequence_name from information_schema.sequences where sequence_schema = 'public';" YOUR_DB` ; do  psql -c "alter sequence \"$tbl\" owner to NEW_OWNER" YOUR_DB ; done

#VIEWS
for tbl in `psql -qAt -c "select table_name from information_schema.views where table_schema = 'public';" YOUR_DB` ; do  psql -c "alter view \"$tbl\" owner to NEW_OWNER" YOUR_DB ; done




Shell

Related
linux find ip of other computers on network Code Example linux find ip of other computers on network Code Example
delete namespace stuck in terminating Code Example delete namespace stuck in terminating Code Example
bash wait for input to continue Code Example bash wait for input to continue Code Example
ubuntu ram check ssh Code Example ubuntu ram check ssh Code Example
remove local commiits Code Example remove local commiits Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
13