pramsey / pgsql-ogr-fdw

PostgreSQL foreign data wrapper for OGR
MIT License
237 stars 34 forks source link

ogr_fdw_info enhancements #181

Closed mccuskk closed 4 years ago

mccuskk commented 4 years ago

Hi

I have been carrying these changes manually for a while so I thought it's about time to see if you might be interested in merging them.

We use ogr_fdw_info as part of an automated process for loading client spreadsheets (XLSX) but the current version was not quite suitable for the following reasons.

  1. Unable to specify output server name.
  2. Unable to specify output table name.
  3. Unable to use worksheet index rather than layer.
  4. Unable to add config options to the foreign data wrapper
  5. Column names were not quoted leading to the possibility of invalid SQL output
  6. Column names were not limited to a max number of characters leading to the program crashing if, for example, the client had forgotten to add column names and the column contains a lot of raw data.
  7. No exit code to let the calling program know if there has been an OGR Error

I would be happy to make any amendments if you are happy to merge with changes.

Many thanks

Kieran

pramsey commented 4 years ago

So, amendments: