@@ -107,12 +107,12 @@ void table_t::start(std::string const &conninfo, std::string const &table_space)
107107
108108 // first with the regular columns
109109 for (auto const &column : m_columns) {
110- sql += " \ " {}\ " {}," _format (column.name , column.type_name );
110+ sql += R"( "{}" {},) "_format (column.name , column.type_name );
111111 }
112112
113113 // then with the hstore columns
114114 for (auto const &hcolumn : m_hstore_columns) {
115- sql += " \ " {}\ " hstore," _format (hcolumn);
115+ sql += R"( "{}" hstore,) "_format (hcolumn);
116116 }
117117
118118 // add tags column
@@ -225,7 +225,7 @@ void table_t::stop(bool updateable, bool enable_hstore_index,
225225 m_sql_conn->exec (sql);
226226
227227 m_sql_conn->exec (" DROP TABLE {}" _format (qual_name));
228- m_sql_conn->exec (" ALTER TABLE {} RENAME TO \ " {}\" " _format (
228+ m_sql_conn->exec (R"( ALTER TABLE {} RENAME TO "{}" ) "_format (
229229 qual_tmp_name, m_target->name ));
230230
231231 log_info (" Creating geometry index on table '{}'..." , m_target->name );
@@ -258,7 +258,7 @@ void table_t::stop(bool updateable, bool enable_hstore_index,
258258 }
259259 for (auto const &hcolumn : m_hstore_columns) {
260260 m_sql_conn->exec (
261- " CREATE INDEX ON {} USING GIN (\ " {}\ " ) {}" _format (
261+ R"( CREATE INDEX ON {} USING GIN ("{}") {}) "_format (
262262 qual_name, hcolumn,
263263 tablespace_clause (table_space_index)));
264264 }
0 commit comments