Until now the default schema was empty and the PostgreSQL search path
was used to find tables etc.
We now set the default schema for the middle and the pgsql and flex
outputs to 'public'.
This simplifies the code, because we don't have to handle the case
without schema specially any more. More importantly it makes it easier
for the user to reason about what osm2pgsql is doing, because it does
not depend on the setting of the search path in the PostgreSQL session.
This fixes a problem where osm2pgsql could not find the
osm2pgsql_properties table it created itself, because it was created in
a different schema than expected (#2010).
The behaviour of the gazetteer output has not changed. It still uses
unqualified names.
This will be a breaking change for those users who rely on the old
behaviour.
Fixes#2010, #2011.
There were several places (pgsql.hpp, pgsql-capabilities.hpp,
db-check.hpp) that had code to check various capabilities, version
numbers etc. of the database we are connected to. This is now
consolidated in pgsql-capabilities.hpp. It needs to be initialized once
at program start by calling init_database_capabilities() with a database
connection object. Checking version numbers or capabilities is then much
easier, because no active database connection is needed any more.
This also adds code to get the list of supported index methods from the
database which we will need shortly. (Only works with PostgreSQL >9.5.)