From 14d4b9206c636adecb0812e60d682416b634af38 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 7 May 2015 23:13:07 +0100 Subject: [PATCH] Fix vagrant to install all thee 3GL functions --- script/vagrant/setup/provision.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -- 2.39.5