Question

Read all tables from POSTGIS schema

  • 23 July 2020
  • 1 reply
  • 14 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?


1 reply

Userlevel 4

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.

Reply