pramsey / pgsql-ogr-fdw

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

unable to import from server with '-' in name #158

Closed aledonati closed 5 years ago

aledonati commented 5 years ago

Hi,

First of all kudos for this fantastic extension!

In an attempt to use a unique name, I am testing the extension with a server named after a guid, something like:

CREATE SERVER "fae4ad53-4e58-4b20-9a6d-a0668fb37a99" FOREIGN DATA WRAPPER ogr_fdw ...

Server creation works, I can see it with pgadmin: NOTICE: Number of tables to be created 86

When I run IMPORT FOREIGN SCHEMA ogr_all FROM SERVER "fae4ad53-4e58-4b20-9a6d-a0668fb37a99" INTO staging

I get an error:

Error ERROR: server ""fae4ad53-4e58-4b20-9a6d-a0668fb37a99"" does not exist CONTEXT: importing foreign table "nameofthetable" SQL state: 42704

The same happens when I choose a name like "abc-def".

I can work around this problem but was wondering if this is a bug or limitation

Thank you, Alessandro