-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use quoted identifiers in generated SQL #311
base: master
Are you sure you want to change the base?
Conversation
This reverts commit 47d26f9.
Deleting the double quotes creates unpleasant bugs
Thanks for your PR! |
'problematic characters' are the reserved words of Postgre, so the 'better solution' is not the solution at all, Just try to generate .toml from OSM2PGSQL imported database. |
Which problematic table or column names does osm2pgsql create? I'm still in favor of letting basic names unquoted. Rule proposal (subset of https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS): "SQL identifiers must begin with a letter a-z or an underscore (_). Subsequent characters in an identifier can be a-z, underscores or digits (0-9)" |
Of course it depends on the configuration, but typical osm2pgsql configs generate column names such as |
That's why T-Rex doesn't need the readability instead of functionality. |
I've tried to deploy a T-Rex server from OSM data.
I've generated a config with
genconfig
command with PostgreSQL.I started to get PostgreSQL's syntax errors, so I've investigated through the code, and I discovered that replacing the braces with nothing is creating these errors, so I've decided to delete that code.
Tests are passed.