postgis/extensions
Sandro Santilli c48b2ed94e Create target dir if non-existing
git-svn-id: http://svn.osgeo.org/postgis/trunk@10039 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-10 20:27:35 +00:00
..
postgis update unpackaged. Need to make this an automated task perhaps thru jenkins first. 2012-07-03 07:57:58 +00:00
postgis_topology Create target dir if non-existing 2012-07-10 20:27:35 +00:00
compute_srid_contiguous_ranges.sql #1834 itemize srid ranges we include and set filter to not back these up. It's long and ugly I know. 2012-06-08 12:45:46 +00:00
make_unpackaged.sql #1727 this will make statements like CREATE EXTENSION postgis FROM unpackaged; CREATE EXTENSION postgis_topology FROM unpackaged; work. It's sadly static at the moment. 2012-03-27 23:17:43 +00:00
Makefile.in Drop the now-generated Makefile on distclean, and ignore it 2012-02-10 09:19:33 +00:00
postgis_extension_helper.sql put in svn Author Date Id Revision keywords 2012-01-09 20:17:59 +00:00
postgis_extension_helper_uninstall.sql put in svn Author Date Id Revision keywords 2012-01-09 20:17:59 +00:00
README Update extensions/README (#1720) 2012-03-27 14:47:12 +00:00
upgradeable_versions.mk Upgrade from 2.0 only 2012-05-22 14:17:07 +00:00

PostGIS Extension for PostgreSQL
================================

PostgreSQL 9.1 (and up) supports PostGIS extensions. A database can easily be
extended to use PostGIS using the syntax::

  CREATE EXTENSION postgis;           -- Includes raster
  CREATE EXTENSION postgis_topology;  -- Depends on postgis

Requirements
------------
 * PostgreSQL 9.1 or later
 * PostGIS must be configured and built ``--with-raster``

Building and installing
-----------------------
First, make sure you follow the regular configuration and installation steps,
completing these steps::

  make
  make install

If you are building from the source SVN repository, it is also recommended to
make the comments, since the function descriptions will be included::

  make comments

Making the comments is not necessary if you are building from the tar.gz source
distributions, since these include pre-built ``postgis_comments.sql``,
``topology_comments.sql``, and ``raster_comments.sql`` files.

Then, to build and install the extensions::

  cd extensions
  make
  make install

The extensions are installed in `SHAREDIR/extension`. (If you're uncertain
where `SHAREDIR` is, run ``pg_config --sharedir``.)

Then in your PostgreSQL database run::

  CREATE EXTENSION postgis;
  CREATE EXTENSION postgis_topology;

The dependency logic should warn if you try to install ``postgis_topology``
without ``postgis`` or try to drop ``postgis`` without first dropping
``postgis_topology``.

You will also not be able to drop any PostGIS functions installed by the
extension.

Manual extension installation
-----------------------------
If you want to manually install the extensions from one server to another,
just copy over the following files to the `SHAREDIR/extension` directory:

 * PostGIS (including raster); from ``extensions/postgis``:
    ``postgis.control``
    ``sql/*``

 * Topology extension; from ``extensions/postgis_topolology``:
     ``postgis_topology.control``
     ``sql/*``