[gdal-dev] Pg Table Listing

Paul Ramsey pramsey at cleverelephant.ca
Wed Mar 18 09:19:27 PDT 2015

We noticed that in databases with lots of tables, OGR throws some pretty crazy SQL at the database, and things get slow and the source of the problem seems to be here:


Which in addition to being a big query on system tables joins back to geometry_columns, which is, itself now a big query on system tables. I think that’s the main problem. Probably either the query should just use the system tables alone, and take advantage of the PostGIS geometry_columns view code as a guide


The only trick is, I guess, figuring out which versions of PgSQL particular system table code will work against. The main dividing line for PostGIS is between versions 1 and 2.  What’s the minimum supported version of PgSQL for OGR?



More information about the gdal-dev mailing list