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.)
This adds a copyright notice to all C++ files and the README clarifying
the license. (There is no change of the license.) This also removes a
few names explicitly mentioned as copyright holders, instead refering to
the git log which has a full list of all osm2pgsql developers. (There is
also still the AUTHORS file which names the most important developers.)
The only exception is the sprompt.cpp file which was taken from
PostgreSQL and keeps its original license information (and, of course,
the files in contrib).
Move the code creating the pgsql function and trigger checking the
geometry validity into its own function. This function can create
the pgsql function in the correct schema if one is specified.
The flex output already has schema support, so it uses this function now
to create the function in the right schema. The pgsql output doesn't
have schema support yet, so it doesn't.