Can someone please explain how I can get the tables in the current database?
I am using postgresql-8.4 psycopg2.
This did the trick for me:
cursor.execute("""SELECT table_name FROM information_schema.tables WHERE table_schema = 'public'""") for table in cursor.fetchall(): print(table)