postgres访问数据库具有模式的数据库表

时间:2016-10-25 12:58:08

标签: postgresql

有4个数据库,其中一个名为REBAR 在钢筋下有两个模式,一个名为public,一个名为sw 在sw下有10个表。

此声明向我展示了所有数据库

SELECT datname from pg_database

此语句返回[]

self.curs.execute("""select table_name from information_schema.tables where table_schema = 'sw' ;""")
tables = self.curs.fetchall()

0 个答案:

没有答案