[Tile-serving] [osm2pgsql-dev/osm2pgsql] Can Flex styles run arbitrary SQL against the database? (Discussion #1415)
Jochen Topf
notifications at github.com
Wed Nov 12 21:14:02 UTC 2025
The `osm2psql.run_sql()` only works in `osm2pgsql-gen`. There is no generic mechanism to run SQL code in osm2pgsql itself. This will be integrated at some point, but currently the generalization stuff is still in beta and lives in its own command.
I don't think we'll want to support a `create_view` command or so. That's a deep rabbit hole, we can not support everything that SQL supports, we only have special suport for stuff that osm2pgsql needs to unerstand to do the right thing. For instance the `define_table()` command in Lua do much more than just creating the table in the database.
So: If you want to run arbitrary SQL after osm2pgsql is done, either use osm2pgsql-gen and the `run_sql()` command or just use psql or any other way of running the SQL.
--
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/discussions/1415#discussioncomment-14952185
You are receiving this because you are subscribed to this thread.
Message ID: <osm2pgsql-dev/osm2pgsql/repo-discussions/1415/comments/14952185 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20251112/3d13f6e2/attachment.htm>
More information about the Tile-serving
mailing list