Skip to content

Commit 98d6df0

Browse files
committed
Move pgsql deprecation check to right spot
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.
1 parent 9ed53e5 commit 98d6df0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/command-line-parser.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,6 @@ void check_options_output_null(CLI::App const &app)
183183

184184
void check_options_output_pgsql(CLI::App const &app, options_t *options)
185185
{
186-
log_warn("The pgsql (default) output is deprecated. For details see "
187-
"https://osm2pgsql.org/doc/"
188-
"faq.html#the-pgsql-output-is-deprecated-what-does-that-mean");
189-
190186
if (app.count("--latlong") + app.count("--merc") + app.count("--proj") >
191187
1) {
192188
throw std::runtime_error{"You can only use one of --latlong, -l, "

src/output-pgsql.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,10 @@ output_pgsql_t::output_pgsql_t(std::shared_ptr<middle_query_t> const &mid,
442442
m_rels_buffer(1024, osmium::memory::Buffer::auto_grow::yes),
443443
m_area_buffer(1024, osmium::memory::Buffer::auto_grow::yes)
444444
{
445+
log_warn("The pgsql (default) output is deprecated. For details see "
446+
"https://osm2pgsql.org/doc/"
447+
"faq.html#the-pgsql-output-is-deprecated-what-does-that-mean");
448+
445449
m_expire_config.full_area_limit = get_options()->expire_tiles_max_bbox;
446450
if (get_options()->expire_tiles_max_bbox > 0.0) {
447451
m_expire_config.mode = expire_mode::hybrid;

0 commit comments

Comments
 (0)