[Tile-serving] [openstreetmap/osm2pgsql] Schema support (#619)

asbjornst notifications at github.com
Thu Oct 6 20:50:51 UTC 2016


I currently see four main mutations of this:
* using prefix option and specifying the schema explicitly in the SQL statements (current code)
* using prefix option and setting the search path if schema is given
* using schema option and specifying the schema explicitly in the SQL statements
* using schema option and setting the search path if schema is given (approach used in #279)

Both option strategies are backwards compatible. 

With regards to Nominatim it doesn't completely support the prefix option at the moment, which makes it hard to introduce it without breaking backwards compatibility. I'm not sure it makes sense to add schema support to the <code>place</code> table, without also add prefix support to it. <code>--prefix</code> currently affects the slim tables in Nominatim mode.

multibackend doesn't currently support the prefix option, so a prefix currently have to be put in the style.

I would prefer <code>--prefix</code> and a possible future <code>--schema</code> to have the same limitations, which was why I implemented it as an extension of <code>--prefix</code>.

The term "schema" can mean either object namespace or the object definitions, due to all databases supporting the latter, and fewer supporting the former, the latter use is more widespread.
Therefore my main objection to <code>--schema</code>, is that by extending the <code>--prefix</code> option, it clearly communicates in which context "schema" should be understood.

By using the schema explicitly in the SQL statements - when specified - it is backwards compatible, and so works as expected even if the default search path has been altered.
The search path approach seams to lead to a few more issues.

Regarding tests, they all pass on my system, but I will write a new test, since the current schema test is good for testing backward compatibility.

@lonvia @pnorman Which mutation should I rewrite this patchset into? Do you have any other things I should take into account before rewriting it?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/619#issuecomment-252084671
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20161006/b6eca78a/attachment-0001.html>


More information about the Tile-serving mailing list