openstreetmap-website/db/functions
Matt Amos ced8ac86ab Remove need for shared library PostgreSQL functions
This repo contains code for three functions to be loaded into PostgreSQL as a shared library:

1. `maptile_for_point`, which is used only by the `/changes` API call. This API call is little-used and IMHO should be deprecated and removed. However, even now it's hardly on the hot path for most development activities.
2. `tile_for_point`, which is used only in migrations. At this point, it seems unlikely that anyone will be doing a migration on existing data which would call this function (most developers will be running migrations on an empty database, to set it up).
3. `xid_to_int4`, which is only used for replication using Osmosis and isn't used in the Rails code at all. Hopefully this will be replaced Real Soon Now, but until then it's a quite advanced feature that most developers won't need.

Therefore, this patch proposes to replace the above three shared library functions with SQL implementations of the first two. These are _much_ slower - by a factor of about 30x, however this makes no difference when they're run on a completely empty database. In return, we're able to drop a dependency on the PostgreSQL server development package, and clean a few lines out of the installation instructions.

It's still possible to make and install the shared library functions, and I've included instructions about how to do that - although it shouldn't be necessary for the vast majority of `openstreetmap-website` developers.
2019-10-04 13:25:00 +01:00
..
.gitignore Ignore some more generated files 2010-04-20 21:41:57 +01:00
functions.sql Remove need for shared library PostgreSQL functions 2019-10-04 13:25:00 +01:00
Makefile Alter the Makefile to be robust against bundler warnings 2018-08-29 12:36:31 +08:00
maptile.c Stop pretending we support MySQL 2012-02-08 14:08:49 +00:00
quadtile.c Stop pretending we support MySQL 2012-02-08 14:08:49 +00:00
xid_to_int4.c Update xid_to_int4 to use postgres version 1 calling convention 2018-04-28 15:16:46 +01:00