@@ -92,12 +92,11 @@ void table_t::start(std::string const &conninfo, std::string const &table_space)
9292
9393 // we are making a new table
9494 if (!m_append) {
95- m_sql_conn->exec (
96- " DROP TABLE IF EXISTS {} CASCADE" _format (qual_name));
95+ m_sql_conn->exec (" DROP TABLE IF EXISTS {} CASCADE" , qual_name);
9796 }
9897
9998 // These _tmp tables can be left behind if we run out of disk space.
100- m_sql_conn->exec (" DROP TABLE IF EXISTS {}" _format ( qual_tmp_name) );
99+ m_sql_conn->exec (" DROP TABLE IF EXISTS {}" , qual_tmp_name);
101100 m_sql_conn->exec (" RESET client_min_messages" );
102101
103102 // making a new table
@@ -149,9 +148,9 @@ void table_t::prepare()
149148{
150149 // let postgres cache this query as it will presumably happen a lot
151150 auto const qual_name = qualified_name (m_target->schema , m_target->name );
152- m_sql_conn->exec (
153- " PREPARE get_wkb(int8) AS SELECT way FROM {} WHERE osm_id = $1" _format (
154- qual_name) );
151+ m_sql_conn->exec (" PREPARE get_wkb(int8) AS "
152+ " SELECT way FROM {} WHERE osm_id = $1" ,
153+ qual_name);
155154}
156155
157156void table_t::generate_copy_column_list ()
@@ -229,23 +228,22 @@ void table_t::stop(bool updateable, bool enable_hstore_index,
229228
230229 m_sql_conn->exec (sql);
231230
232- m_sql_conn->exec (" DROP TABLE {}" _format ( qual_name) );
233- m_sql_conn->exec (R"( ALTER TABLE {} RENAME TO "{}")" _format (
234- qual_tmp_name, m_target->name ) );
231+ m_sql_conn->exec (" DROP TABLE {}" , qual_name);
232+ m_sql_conn->exec (R"( ALTER TABLE {} RENAME TO "{}")" , qual_tmp_name,
233+ m_target->name );
235234
236235 log_info (" Creating geometry index on table '{}'..." , m_target->name );
237236
238237 // Use fillfactor 100 for un-updatable imports
239- m_sql_conn->exec (" CREATE INDEX ON {} USING GIST (way) {} {}" _format (
240- qual_name, (updateable ? " " : " WITH (fillfactor = 100)" ),
241- tablespace_clause (table_space_index) ));
238+ m_sql_conn->exec (" CREATE INDEX ON {} USING GIST (way) {} {}" , qual_name,
239+ (updateable ? " " : " WITH (fillfactor = 100)" ),
240+ tablespace_clause (table_space_index));
242241
243242 /* slim mode needs this to be able to apply diffs */
244243 if (updateable) {
245244 log_info (" Creating osm_id index on table '{}'..." , m_target->name );
246- m_sql_conn->exec (
247- " CREATE INDEX ON {} USING BTREE (osm_id) {}" _format (
248- qual_name, tablespace_clause (table_space_index)));
245+ m_sql_conn->exec (" CREATE INDEX ON {} USING BTREE (osm_id) {}" ,
246+ qual_name, tablespace_clause (table_space_index));
249247 if (m_srid != " 4326" ) {
250248 create_geom_check_trigger (m_sql_conn.get (), m_target->schema ,
251249 m_target->name ,
@@ -258,15 +256,14 @@ void table_t::stop(bool updateable, bool enable_hstore_index,
258256 log_info (" Creating hstore indexes on table '{}'..." ,
259257 m_target->name );
260258 if (m_hstore_mode != hstore_column::none) {
261- m_sql_conn->exec (
262- " CREATE INDEX ON {} USING GIN (tags) {} " _format (
263- qual_name, tablespace_clause (table_space_index) ));
259+ m_sql_conn->exec (" CREATE INDEX ON {} USING GIN (tags) {} " ,
260+ qual_name,
261+ tablespace_clause (table_space_index));
264262 }
265263 for (auto const &hcolumn : m_hstore_columns) {
266- m_sql_conn->exec (
267- R"( CREATE INDEX ON {} USING GIN ("{}") {})" _format (
268- qual_name, hcolumn,
269- tablespace_clause (table_space_index)));
264+ m_sql_conn->exec (R"( CREATE INDEX ON {} USING GIN ("{}") {})" ,
265+ qual_name, hcolumn,
266+ tablespace_clause (table_space_index));
270267 }
271268 }
272269 log_info (" Analyzing table '{}'..." , m_target->name );
0 commit comments