diff --git a/README.postgis b/README.postgis
index f90e1f83d..8103eb415 100644
--- a/README.postgis
+++ b/README.postgis
@@ -37,17 +37,11 @@ Then run:
make install
PostGIS now requires the PL/pgSQL procedural language in order to operate
-correctly. To install PL/pgSQL, locate the plpgsql.so library in your
-PostgreSQL installation (usually in the 'lib' directory). Then run the
-following SQL commands in your database, replacing the plpgsql.so
-location with the correct one for your system:
+correctly. To install PL/pgSQL you should use the createlang script coming
+with postgresql. (The PostgreSQL 7.1 Programmer's Guide details
+if you want to this manually for some reason.)
- CREATE FUNCTION plpgsql_call_handler()
- RETURNS OPAQUE AS '/usr/local/pgsql/lib/plpgsql.so'
- LANGUAGE 'C';
- CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql'
- HANDLER plpgsql_call_handler
- LANCOMPILER 'PL/pgSQL';
+ createlang plpgsql yourdatabase
Finally, load the function and object definitions into your database
with psql (you must run this as a database user with system privledges):
diff --git a/doc/postgis.xml b/doc/postgis.xml
index bdc482581..db08be39a 100644
--- a/doc/postgis.xml
+++ b/doc/postgis.xml
@@ -109,11 +109,17 @@
"postgis" directory, and run the compile and install commands.
# cd ./postgis-0.6
# make
-# make installAs of version 0.6, PostGIS requires the PL/pgSQL procedural language extension. Before loading the postgis.sql file, you must first enable PL/pgSQL. The code snippet below gives an example, substitute the correct location of your plpgsql.so library.CREATE FUNCTION plpgsql_call_handler () RETURNS OPAQUE AS
- '/usr/local/pgsql/lib/plpgsql.so' LANGUAGE 'C';
-CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql'
- HANDLER plpgsql_call_handler
- LANCOMPILER 'PL/pgSQL';
+# make install
+
+As of version 0.6, PostGIS requires the PL/pgSQL procedural language extension.
+Before loading the postgis.sql file, you must first enable PL/pgSQL.
+You should use the createlang command.
+The PostgreSQL 7.1 Programmer's Guide has the details if you want to this
+manually for some reason.
+
+# createlang plpgsql [yourdatabase]
+
+
Finally, you
must load the PostGIS object and function definitions into your database.
diff --git a/postgis.sql.in b/postgis.sql.in
index 8efcc5edd..1bb84751d 100644
--- a/postgis.sql.in
+++ b/postgis.sql.in
@@ -1,14 +1,8 @@
BEGIN TRANSACTION;
---- you might have to define the plpgsql language something like;
-
--- CREATE FUNCTION plpgsql_call_handler () RETURNS OPAQUE AS
--- '/usr/local/pgsql/lib/plpgsql.so' LANGUAGE 'C';
---
--- CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql'
--- HANDLER plpgsql_call_handler
--- LANCOMPILER 'PL/pgSQL';
+--- you might have to define the plpgsql language usually done with the;
+--- changelang script.
-- here's some hockey code to test to see if plpgsql is installed
-- if it is, you get a message "plpgsql is installed"