postgis/extensions
2023-02-20 11:08:28 +01:00
..
address_standardizer Support PCRE2 where available and PCRE otherwise, closes #5019 2021-11-25 08:52:53 -08:00
postgis Encode dependency of unpackaged script on install script 2022-10-31 12:35:02 +01:00
postgis_raster Encode dependency of raster unpackaged sql on create_unpackage.pl 2022-10-29 12:09:39 +02:00
postgis_sfcgal Package objects before upgrading (only those which exist) 2022-08-12 09:49:14 +02:00
postgis_tiger_geocoder More tiger install cleanup 2022-06-14 18:06:23 -04:00
postgis_topology Mark topology.topology_id_seq as a user data 2023-02-20 11:08:28 +01:00
extensions_unpackage.sh Drop support for stdout in extensions_unpackage.sh 2019-03-10 18:51:13 +00:00
Makefile.in Split "check" into "check-regress" and "check-unit" 2019-08-22 13:36:59 +00:00
postgis_extension_helper_uninstall.sql Change signature of AddToSearchPath, reference #5150 for PostGIS 3.2.2 2022-05-19 22:24:12 -04:00
postgis_extension_helper.sql More schema qualifications references #5155 for PostGIS 3.2.2 2022-05-29 02:13:05 -04:00
README Fix postgresql version number and get rid of notice about --with-raster 2021-06-24 16:52:45 -04:00
upgrade-paths-rules.mk upgrade-paths-rules.mk: Drop the -v flag 2019-09-25 10:31:18 +00:00
upgradeable_versions.mk Flip to next milestone 2022-11-13 01:02:00 -05:00

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

PostgreSQL 9.6 (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.6 or later

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/*``