File: README.Debian

package info (click to toggle)
postgis 2.1.4%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 35,424 kB
  • ctags: 8,886
  • sloc: sql: 113,491; ansic: 97,254; xml: 41,127; sh: 11,925; java: 5,662; perl: 3,113; makefile: 2,265; python: 1,198; yacc: 438; lex: 114
file content (95 lines) | stat: -rw-r--r-- 3,655 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
Debian README for Postgis
=========================

These are the PostGIS packages for Debian. PostGIS is split into
multiple Debian packages:

postgresql-N.M-postgis-X.Y
  This is the PostGIS module for the PostgreSQL server itself.  It
  contains the library which is loaded by the server (postgis.so), as
  of PostGIS version X.Y and for PostgreSQL version N.M.

  Once the extension is created for a database, this package usually
  is enough to keep PostGIS running.  An upgrade may provide a newer
  PostGIS version of this package that can be installed in parallel.
  Therefore not touching existing installations.  You'll need to run
  the appropriate SQL scripts to upgrade your databases to use a newer
  PostGIS version, though.  Of course, this does not apply to patch
  releases or bug fixes.


postgresql-N.M-postgis-scripts
  This package provides necessary scripts for creating or upgrading
  the PostGIS extension in a given database, the extension's control
  file, and various other SQL scripts.

  To install the PostGIS extension as well as its topology extension
  in a specific database, you need to run the following SQL commands
  from your database prompt:

    CREATE EXTENSION postgis;
    CREATE EXTENSION postgis_topology;        -- optional

  PostGIS also ships a decoder for TIGER data in a separate extension
  that can additionally be installed as follows:

    CREATE EXTENSION fuzzystrmatch;
    CREATE EXTENSION postgis_tiger_decoder;


postgis
  This package contains the user-oriented PostGIS utilities for
  loading data into and pulling data out of a PostGIS-enabled
  PostgreSQL database.  These utilities are: pgsql2shp, shp2pgsql,
  shp2pgsql-gui, and raster2pgsql.  This package can be installed
  independent of the extension and can well be used on client
  machines.


libpostgis-java
  This package contains the Java library for using JDBC with a PostGIS-
  enabled PostgreSQL database.


Upgrading existing spatial databases
====================================

Upgrading existing spatial databases can be tricky as it requires
replacement or introduction of new PostGIS object definitions.

Unfortunately not all definitions can be easily replaced in 
a live database, so sometimes your best bet is a dump/reload
process. 

PostGIS provides a SOFT UPGRADE procedure for minor or bugfix
releases, and an HARD UPGRADE procedure for major releases.

--- SOFT UPGRADE ---

Nowadays, soft upgrades are trivially handled by the Postgres
extension mechanism.  For the manual procedure for Postgres versions
before 9.1, please refer to the PostGIS documentation.  Using
extensions, you simply need to run the following commands per database
to upgrade to a new version of the extensions:

  ALTER EXTENSION postgis UPDATE TO "2.2.2";
  ALTER EXTENSION postgis_topology UPDATE TO "2.2.2";

If a soft upgrade is not possible the SQL command should emit an error
and you need to perform a HARD UPGRADE, instead.

--- HARD UPGRADE ---

Hard upgrades are required when object definitions have changed,
aggregates have changed or been added, and when the underlying
PostgreSQL database itself has undergone a major update.  The
procedure basically consists of a PostgreSQL dump/restore, but the
extension needs a bit of extra care, depending on what PostGIS version
you are upgrading from.  Please refer to the PostGIS documentation.

All of the required SQL files mentioned in the documentation should be
provided by the postgresql-M.N-postgis-scripts package and can be
found in the following directory after its installation (replace M.N
with the appropriate Postgres version used):

  /usr/share/postgresql/M.N