Open robe2 opened 3 years ago
Minimal reproduction:
select pg_relation_is_updatable('staging.ne_10m_admin_1_states_provinces'::regclass,false);
OK, I'm pretty sure I see what's happening, but not sure how to fix it without an axe. The updateable test is trying a "soft updateable open" on the file to see if its openable, but the GDAL open process is tossing a CE_FATAL error when it cannot open one of the shp components in updateable mode. That in turn gets mapped in the OGR error handler to a PgSQL FATAL which stops everything dead, so the logic further on, that checks for a NULL layer and sets the updateable to False never gets to run.
It may be that the soft update check logic just never worked at all, and never had a chance to be tested. I should try opening a local shp file that has only read bits set.
Workaround would be to declare the layer not updateable in the layer options, since that check gets done before the opening test.
I also tried with: datasources which are equivalent: /fdw_data/argentina-latest-free.shp.zip and /vsizip//fdw_data/argentina-latest-free.shp.zip. Both work as far as linking and querying but the one with /vsizip chokes in the information_schema.tables query
Works fine outputs:
This also works:
This gives error, but leaving out the is_insertable_into column, it works okay
Error:
Expected behavior is the query does not error and the is_insertable_into has a false in output because vszip are not editable.
My Version info
outputs: