File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,12 @@ static table_column_type get_column_type_from_string(std::string const &type)
6262 throw fmt_error (" Unknown column type '{}'." , type);
6363 }
6464
65+ if (column_type->type == table_column_type::area) {
66+ log_warn (" The 'area' column type is deprecated. Please read" );
67+ log_warn (" https://osm2pgsql.org/doc/tutorials/"
68+ " switching-from-add-row-to-insert/" );
69+ }
70+
6571 return column_type->type ;
6672}
6773
Original file line number Diff line number Diff line change @@ -587,6 +587,13 @@ int output_flex_t::table_add_row()
587587 }
588588 lua_remove (lua_state (), 1 );
589589
590+ if (m_add_row_has_never_been_called) {
591+ m_add_row_has_never_been_called = false ;
592+ log_warn (" The add_row() function is deprecated. Please read" );
593+ log_warn (" https://osm2pgsql.org/doc/tutorials/"
594+ " switching-from-add-row-to-insert/" );
595+ }
596+
590597 if (m_calling_context == calling_context::process_node) {
591598 if (!table.matches_type (osmium::item_type::node)) {
592599 throw fmt_error (" Trying to add node to table '{}'." , table.name ());
Original file line number Diff line number Diff line change @@ -316,6 +316,8 @@ class output_flex_t : public output_t
316316 * add_row() command.
317317 */
318318 bool m_disable_add_row = false ;
319+
320+ bool m_add_row_has_never_been_called = true ;
319321};
320322
321323#endif // OSM2PGSQL_OUTPUT_FLEX_HPP
You can’t perform that action at this time.
0 commit comments