So basically I have 2 superusers, postgres and eric, each with their own databases. What I want to do is, while being connected to one of them, access the database (tables to be more precise) of the other. The tables of both databases are in public schema.
I am using this query, which I found on another question on the forum, but without any result:
SELECT table_name
FROM information_schema.tables
WHERE table_schema='public'
I have changed the owners of the databases, offered all the privileges to both roles, but nothing. All I get are only the tables of the database under that user, not both.
Any idea what I could be missing? Thanks.
P.S: I am using PostgreSQL 9.3, and coding in Python 2.7