From: Tom Hughes Date: Thu, 7 May 2015 22:13:07 +0000 (+0100) Subject: Fix vagrant to install all thee 3GL functions X-Git-Tag: live~4712 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/14d4b9206c636adecb0812e60d682416b634af38 Fix vagrant to install all thee 3GL functions --- diff --git a/script/vagrant/setup/provision.sh b/script/vagrant/setup/provision.sh index 47534b84d..9cbe7849b 100644 --- a/script/vagrant/setup/provision.sh +++ b/script/vagrant/setup/provision.sh @@ -47,8 +47,9 @@ fi # build and set up postgres extensions pushd db/functions sudo -u vagrant make -sudo -u vagrant psql openstreetmap -c "drop function if exists maptile_for_point(int8, int8, int4)" -sudo -u vagrant psql openstreetmap -c "CREATE FUNCTION maptile_for_point(int8, int8, int4) RETURNS int4 AS '/srv/openstreetmap-website/db/functions/libpgosm.so', 'maptile_for_point' LANGUAGE C STRICT" +sudo -u vagrant psql openstreetmap -c "CREATE OR REPLACE FUNCTION maptile_for_point(int8, int8, int4) RETURNS int4 AS '/srv/openstreetmap-website/db/functions/libpgosm.so', 'maptile_for_point' LANGUAGE C STRICT" +sudo -u vagrant psql openstreetmap -c "CREATE OR REPLACE FUNCTION tile_for_point(int4, int4) RETURNS int8 AS '/srv/openstreetmap-website/db/functions/libpgosm.so', 'tile_for_point' LANGUAGE C STRICT" +sudo -u vagrant psql openstreetmap -c "CREATE OR REPLACE FUNCTION xid_to_int4(xid) RETURNS int4 AS '/srv/openstreetmap-website/db/functions/libpgosm.so', 'xid_to_int4' LANGUAGE C STRICT" popd # set up sample configs if [ ! -f config/database.yml ]; then