-
-
Notifications
You must be signed in to change notification settings - Fork 475
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
[Flex] Provide conninfo to Lua script #1212
Comments
Do you have an actual, current use case for this? We should not just add features that seem nice or useful, because we have to support them until the end of times... |
I added a number of use cases to #1211 (comment), which all depend on database access, and are equally relevant to this issue. My assumption is that osm2pgsql will not provide a generic interface to execute database queries (both SELECTs, UPDATES, INSERT, etc.), hence the need for an external Lua library to access the database. To avoid hard-coding database names, or doing any strange tricks to extracts the relevant parameters from the osm2pgsql command line, having the connection parameters readily available in Lua seemed like the least intrusive option. |
Closing as per same reason as #1211. |
This relates a bit to #1211. Assuming we want to create additional indices, or use database lookups, etc., it would be useful to have access to the same database connection information that the C++ code uses, and leverage a library like
luasql.postgres
:Maybe this one liner would be sufficient? There's one caveat: conninfo might contain a password. Not sure, if we can assume Lua scripts to be trustworthy enough here.
The text was updated successfully, but these errors were encountered: