File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ table_t::table_t(table_t const &other,
4747 // this would be premature.
4848 if (other.sql_conn ) {
4949 connect ();
50+ prepare ();
5051 }
5152}
5253
@@ -171,6 +172,11 @@ void table_t::start(std::string const &conninfo,
171172 // TODO: change the type of the geometry column if needed - this can only change to a more permissive type
172173 }
173174
175+ prepare ();
176+ }
177+
178+ void table_t::prepare ()
179+ {
174180 // let postgres cache this query as it will presumably happen a lot
175181 pgsql_exec_simple (sql_conn, PGRES_COMMAND_OK,
176182 (fmt (" PREPARE get_wkb (" POSTGRES_OSMID_TYPE
Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ class table_t
7171
7272 protected:
7373 void connect ();
74+ void prepare ();
7475 void teardown ();
7576
7677 void write_columns (taglist_t const &tags, std::vector<bool > *used);
You can’t perform that action at this time.
0 commit comments