Skip to content

Commit

Permalink
Move pgsql deprecation check to right spot
Browse files Browse the repository at this point in the history
The check was in the wrong position. When running updates the output is
read from the osm2pgsql_properties table which only happened after the
check, so you'd still see the message even if you are using the flex
output.

Sorry about that.
  • Loading branch information
joto committed Sep 19, 2024
1 parent 9ed53e5 commit 98d6df0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/command-line-parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,6 @@ void check_options_output_null(CLI::App const &app)

void check_options_output_pgsql(CLI::App const &app, options_t *options)
{
log_warn("The pgsql (default) output is deprecated. For details see "
"https://osm2pgsql.org/doc/"
"faq.html#the-pgsql-output-is-deprecated-what-does-that-mean");

if (app.count("--latlong") + app.count("--merc") + app.count("--proj") >
1) {
throw std::runtime_error{"You can only use one of --latlong, -l, "
Expand Down
4 changes: 4 additions & 0 deletions src/output-pgsql.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,10 @@ output_pgsql_t::output_pgsql_t(std::shared_ptr<middle_query_t> const &mid,
m_rels_buffer(1024, osmium::memory::Buffer::auto_grow::yes),
m_area_buffer(1024, osmium::memory::Buffer::auto_grow::yes)
{
log_warn("The pgsql (default) output is deprecated. For details see "
"https://osm2pgsql.org/doc/"
"faq.html#the-pgsql-output-is-deprecated-what-does-that-mean");

m_expire_config.full_area_limit = get_options()->expire_tiles_max_bbox;
if (get_options()->expire_tiles_max_bbox > 0.0) {
m_expire_config.mode = expire_mode::hybrid;
Expand Down

0 comments on commit 98d6df0

Please sign in to comment.