<p>This repo contains code for three functions to be loaded into PostgreSQL as a shared library:</p>
<ol>
<li><code>maptile_for_point</code>, which is used only by the <code>/changes</code> 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.</li>
<li><code>tile_for_point</code>, 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).</li>
<li><code>xid_to_int4</code>, 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.</li>
</ol>
<p>Therefore, this patch proposes to replace the above three shared library functions with SQL implementations of the first two. These are <em>much</em> 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.</p>
<p>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 <code>openstreetmap-website</code> developers.</p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/openstreetmap/openstreetmap-website/pull/2383'>https://github.com/openstreetmap/openstreetmap-website/pull/2383</a></p>
<h4>Commit Summary</h4>
<ul>
<li>Remove need for shared library PostgreSQL functions</li>
</ul>
<h4>File Changes</h4>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2383/files#diff-0">.travis.yml</a>
(6)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2383/files#diff-1">INSTALL.md</a>
(59)
</li>
<li>
<strong>A</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2383/files#diff-2">db/functions/functions.sql</a>
(70)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2383/files#diff-3">script/vagrant/setup/provision.sh</a>
(29)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/2383.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/2383.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/2383.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/2383.diff</a></li>
</ul>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2383?email_source=notifications&email_token=AAK2OLOX4ZZN6NF5WXBHXATQM4Y6BA5CNFSM4I5PEPSKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HPVFZHQ">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLIF6XHYC3ZOSDZDGY3QM4Y6BANCNFSM4I5PEPSA">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAK2OLJMS54ZMFVPL25SNPDQM4Y6BA5CNFSM4I5PEPSKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HPVFZHQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/2383?email_source=notifications\u0026email_token=AAK2OLOX4ZZN6NF5WXBHXATQM4Y6BA5CNFSM4I5PEPSKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HPVFZHQ",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/2383?email_source=notifications\u0026email_token=AAK2OLOX4ZZN6NF5WXBHXATQM4Y6BA5CNFSM4I5PEPSKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HPVFZHQ",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>