[Tile-serving] [osm2pgsql] Add an option to specify the target schema for import (#279)

Paul Norman notifications at github.com
Tue Feb 10 08:20:06 UTC 2015


> @@ -12,10 +12,10 @@ using std::string;
>  
>  table_t::table_t(const string& conninfo, const string& name, const string& type, const columns_t& columns, const hstores_t& hstore_columns,
>      const int srid, const int scale, const bool append, const bool slim, const bool drop_temp, const int hstore_mode,
> -    const bool enable_hstore_index, const boost::optional<string>& table_space, const boost::optional<string>& table_space_index) :
> +    const bool enable_hstore_index, const boost::optional<string>& table_space, const boost::optional<string>& table_space_index, const boost::optional<string>& schema) :

https://github.com/openstreetmap/osm2pgsql/blob/b81f2d992cf96aebe84e24eb57cbf4c483a3df5a/output-pgsql.cpp#L710-L712 explains we've got this constructor.
```c++
//tremble in awe of this massive constructor! seriously we are trying to avoid passing an
//options object because we want to make use of the table_t in output_mutli_t which could
//have a different tablespace/hstores/etc per table
```
Without checking `git blame` I can tell that @kevinkreiser wrote that comment ;)

That's not to say it couldn't be refactored to avoid the massive constructor. Perhaps by putting table options into a `table_options_t` and passing that in?

---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/279/files#r24395365
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20150210/01ffd3ff/attachment.html>


More information about the Tile-serving mailing list