From: Daniel Silverstone Date: Sun, 9 Nov 2008 10:41:48 +0000 (+0000) Subject: Update DB readme for PgSQL a bit X-Git-Tag: live~7573^2~185 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/4f15f5926792f5ba2b0efc39792c75830eb82199?hp=7a3f7bc2dd1cd89cb69a4b6f0f1e38859535891d Update DB readme for PgSQL a bit --- diff --git a/db/README b/db/README index 447c63651..f00029339 100644 --- a/db/README +++ b/db/README @@ -25,12 +25,12 @@ $ mysql -u -p > flush privileges; > exit -Creating functions -==================== +Creating functions For MySQL +============================== Run this command in the db/functions directory: -$ make +$ make libmyosm.so Make sure the db/functions directory is on the MySQL server's library path and restart the MySQL server. @@ -49,6 +49,22 @@ $ mysql -u -p openstreetmap > create function maptile_for_point returns integer soname 'libmyosm.so'; > exit +Creating functions for PgSQL +============================== + +Run this command in the db/functions directory: + +$ make libmyosm.so + +Now create the function as follows: + +$ psql openstreetmap +(This may need authentication or a -u ) + +> CREATE FUNCTION maptile_for_point(int8, int8, int4) RETURNS int4 + AS '/path/to/rails-port/db/functions/libpgosm', 'maptile_for_point' + LANGUAGE C STRICT; + Creating database skeleton tables ===================================