go-spatial / tegola

Tegola is a Mapbox Vector Tile server written in Go
http://tegola.io/
MIT License
1.25k stars 192 forks source link

Write config file for tables having ' - ' and capital letters in their name. #969

Closed MuhammadYasirAliKhan786 closed 4 months ago

MuhammadYasirAliKhan786 commented 4 months ago

Hi, I am trying to write a config file contains tables having hyphen character ' - ' and capital letters in their name. But its failed with the following error:

tegola-server | Error: could not register providers: could not generate sql, for layer(Registered_Parks_and_Gardens): ERROR: relation "registered_parks_and_gardens" does not exist (SQLSTATE 42P01).

Or:

tegola-server | Error: could not register providers: could not generate sql, for layer(civil-parish): ERROR: syntax error at or near "-" (SQLSTATE 42601).

I search through internet but unable to find any solution. Any thoughts on this?

iwpnd commented 4 months ago

Please provide an obfuscated SQL statement.

My guess is that you'll have to put the table name in ''.

ARolek commented 4 months ago

I'm also interested in what the config looks like. If you provide a config we can build a test case around this.

MuhammadYasirAliKhan786 commented 4 months ago

Thankyou @iwpnd , you were right, it was only the matter of putting table names inside ''.

gdey commented 4 months ago

@MuhammadYasirAliKhan786 the SQL that was being sent is one that you put in the config, and not one that is generate by the system correct?