Skip to main content
Question

Read all tables from POSTGIS schema

  • July 23, 2020
  • 1 reply
  • 43 views

I need to read all tables from Postgis scehma. With reader I got only tables which has geometry or which has tables related to geometry tables with foreign keys.

Is there some option to read them all, or some Python script which can help me with this?

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

david_r
Celebrity
  • July 23, 2020

You can access the Postgresql metadata tables in the information_schema, e.g. in a SQLExecutor:

SELECT * FROM information_schema.tables 
WHERE table_schema = 'public'

This will return a list of all the tables in the schema public, which you can then pass on to e.g. a FeatureReader, if you need the contents.