postgres accessing database tables where the data base has a schema
<p>have 4 databases one of them is named REBAR
under rebar there are two schemas one named public and one named sw
under sw there are 10 table.</p>

<p>this statement shows me all data bases</p>

<pre><code>SELECT datname from pg_database
</code></pre>

<p>this statement returns []</p>

<pre><code>self.curs.execute("""select table_name from information_schema.tables where table_schema = 'sw' ;""")
tables = self.curs.fetchall()
</code></pre>