Scirocco :
You can see who is owner in certain table:\n\nselect * from pg_tables where tablename = 'my_tbl';\n\n\nor you can see all tables by certain owner:\n\nselect * from pg_tables where tableowner = 'username';\n",
2018-08-07T09:08:33
a_horse_with_no_name :
The owner is (if nothing else happened) the user (role) that created the table. So if user arthur runs CREATE TABLE foo (id INTEGER), arthur owns the table.\nThe owner of a table has all privileges on it - including the privilege to drop it. Or the privilege to grant other users (roles) access to the table.\nThe SQL script generated by pg_dump typically includes the ALTER TABLE ... OWNER TO ... statement as those scripts are intended to be run by the DBA and in that case all tables would be owned by the DBA - which means the "real" owner could not change or access the tables.",
2015-11-21T09:32:31