From 26dd4e6e2c5e34522e491de529e1eacc31650e78 Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Wed, 20 Dec 2023 12:03:12 +0100 Subject: [PATCH] Check that we are using flex output in osm2pgsql-gen --- src/gen/osm2pgsql-gen.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gen/osm2pgsql-gen.cpp b/src/gen/osm2pgsql-gen.cpp index 31cbaa50b..55a9ce46e 100644 --- a/src/gen/osm2pgsql-gen.cpp +++ b/src/gen/osm2pgsql-gen.cpp @@ -796,6 +796,11 @@ int main(int argc, char *argv[]) } } + if (properties.get_string("output", "flex") != "flex") { + throw std::runtime_error{ + "osm2pgsql-gen only works with flex output"}; + } + bool const updatable = properties.get_bool("updatable", false); genproc_t gen{style, conninfo, dbschema, append, updatable, jobs}; gen.run();