pramsey / pgsql-ogr-fdw

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

launder_column_names and launder_table_names config options are gone #222

Closed robe2 closed 3 years ago

robe2 commented 3 years ago

Not sure if this was an intentional change or accidental. These config options are still listed in README so they should be updated to reflect how you do this now. If unintentional, can you please put back.

CREATE SERVER fds
    FOREIGN DATA WRAPPER ogr_fdw
    OPTIONS(datasource '/fdw_data/no_geom.csv', format 'CSV',   launder_column_names 'false');

I get an error:

ERROR:  invalid option "launder_column_names"
HINT:  Valid options in this context are: datasource, format, updateable, config_options, character_encoding, open_options
SQL state: HV00D
SELECT ogr_fdw_version();

Yields: OGR_FDW="1.1" GDAL="3.2.3"

I'm not sure when it broke cause I normally don't use this feature except when I need to pivot data into a key value store. Just happened to need to now.

robe2 commented 3 years ago

User error. Forgot it was part of IMPORT FOREIGN SCHEMA

IMPORT FOREIGN SCHEMA ogr_all
  LIMIT TO("Cities")
  FROM server fgdbtest
  INTO fgdbcitysub
  OPTIONS (launder_table_names 'false') ;