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:
-
- 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';
+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.)
+
+ 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):
"postgis" directory, and run the compile and install commands. </para>
<programlisting># cd ./postgis-0.6
# make
-# make install</programlisting></listitem><listitem><para>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. The code snippet below gives an example, substitute the correct location of your <filename>plpgsql.so</filename> library.</para><programlisting>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';</programlisting></listitem>
+# make install</programlisting></listitem>
+ <listitem><para>
+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 <filename>createlang</filename> command.
+The PostgreSQL 7.1 Programmer's Guide has the details if you want to this
+manually for some reason.
+<programlisting>
+# createlang plpgsql [yourdatabase]
+</programlisting>
+ </listitem>
<listitem>
<para>Finally, you
must load the PostGIS object and function definitions into your database. </para>
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"