mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Fixed #23108 -- Dropped support for PostgreSQL 8.4 & PostGIS 1.3, 1.4.
Thanks Claude Paroz for the review.
This commit is contained in:
parent
7ce4ef58c9
commit
a9bdce7e55
18 changed files with 86 additions and 185 deletions
|
@ -1,9 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
POSTGIS_SQL_PATH=`pg_config --sharedir`
|
||||
createdb -E UTF8 template_postgis # Create the template spatial database.
|
||||
createlang -d template_postgis plpgsql # Adding PLPGSQL language support.
|
||||
psql -d postgres -c "UPDATE pg_database SET datistemplate='true' WHERE datname='template_postgis';"
|
||||
psql -d template_postgis -f $POSTGIS_SQL_PATH/lwpostgis.sql # Loading the PostGIS SQL routines
|
||||
psql -d template_postgis -f $POSTGIS_SQL_PATH/spatial_ref_sys.sql
|
||||
psql -d template_postgis -c "GRANT ALL ON geometry_columns TO PUBLIC;" # Enabling users to alter spatial tables.
|
||||
psql -d template_postgis -c "GRANT ALL ON spatial_ref_sys TO PUBLIC;"
|
|
@ -1,9 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
POSTGIS_SQL_PATH=`pg_config --sharedir`/contrib
|
||||
createdb -E UTF8 template_postgis # Create the template spatial database.
|
||||
createlang -d template_postgis plpgsql # Adding PLPGSQL language support.
|
||||
psql -d postgres -c "UPDATE pg_database SET datistemplate='true' WHERE datname='template_postgis';"
|
||||
psql -d template_postgis -f $POSTGIS_SQL_PATH/postgis.sql # Loading the PostGIS SQL routines
|
||||
psql -d template_postgis -f $POSTGIS_SQL_PATH/spatial_ref_sys.sql
|
||||
psql -d template_postgis -c "GRANT ALL ON geometry_columns TO PUBLIC;" # Enabling users to alter spatial tables.
|
||||
psql -d template_postgis -c "GRANT ALL ON spatial_ref_sys TO PUBLIC;"
|
|
@ -1,26 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
GEOGRAPHY=0
|
||||
POSTGIS_SQL=postgis.sql
|
||||
|
||||
# For Ubuntu 10.04
|
||||
if [ -d "/usr/share/postgresql/8.4/contrib" ]
|
||||
then
|
||||
POSTGIS_SQL_PATH=/usr/share/postgresql/8.4/contrib
|
||||
fi
|
||||
|
||||
# For Ubuntu 10.10 (with PostGIS 1.5)
|
||||
if [ -d "/usr/share/postgresql/8.4/contrib/postgis-1.5" ]
|
||||
then
|
||||
POSTGIS_SQL_PATH=/usr/share/postgresql/8.4/contrib/postgis-1.5
|
||||
GEOGRAPHY=1
|
||||
fi
|
||||
|
||||
# For Ubuntu 11.10 / Linux Mint 12 (with PostGIS 1.5)
|
||||
# For Ubuntu 11.10, 12.04 / Linux Mint 12 (with PostGIS 1.5)
|
||||
if [ -d "/usr/share/postgresql/9.1/contrib/postgis-1.5" ]
|
||||
then
|
||||
POSTGIS_SQL_PATH=/usr/share/postgresql/9.1/contrib/postgis-1.5
|
||||
GEOGRAPHY=1
|
||||
fi
|
||||
|
||||
createdb -E UTF8 template_postgis && \
|
||||
|
@ -30,8 +15,4 @@ psql -d template_postgis -f $POSTGIS_SQL_PATH/$POSTGIS_SQL && \
|
|||
psql -d template_postgis -f $POSTGIS_SQL_PATH/spatial_ref_sys.sql && \
|
||||
psql -d template_postgis -c "GRANT ALL ON geometry_columns TO PUBLIC;" && \
|
||||
psql -d template_postgis -c "GRANT ALL ON spatial_ref_sys TO PUBLIC;"
|
||||
|
||||
if [ $GEOGRAPHY -eq 1 ]
|
||||
then
|
||||
psql -d template_postgis -c "GRANT ALL ON geography_columns TO PUBLIC;"
|
||||
fi
|
||||
psql -d template_postgis -c "GRANT ALL ON geography_columns TO PUBLIC;"
|
||||
|
|
|
@ -14,7 +14,7 @@ Program Description Required
|
|||
`PROJ.4`_ Cartographic Projections library Yes (PostgreSQL and SQLite only) 4.8, 4.7, 4.6, 4.5, 4.4
|
||||
:ref:`GDAL <ref-gdal>` Geospatial Data Abstraction Library Yes (SQLite only) 1.10, 1.9, 1.8, 1.7
|
||||
:ref:`GeoIP <ref-geoip>` IP-based geolocation library No 1.4
|
||||
`PostGIS`__ Spatial extensions for PostgreSQL Yes (PostgreSQL only) 2.1, 2.0, 1.5, 1.4, 1.3
|
||||
`PostGIS`__ Spatial extensions for PostgreSQL Yes (PostgreSQL only) 2.1, 2.0, 1.5
|
||||
`SpatiaLite`__ Spatial extensions for SQLite Yes (SQLite only) 4.1, 4.0, 3.0, 2.4
|
||||
======================== ==================================== ================================ ==========================
|
||||
|
||||
|
@ -31,8 +31,6 @@ totally fine with GeoDjango. Your mileage may vary.
|
|||
GDAL 1.9.0 2012-01-03
|
||||
GDAL 1.10.0 2013-04-29
|
||||
GDAL 1.11.0 2014-04-25 # To be tested!
|
||||
PostGIS 1.3.0 2007-08-09
|
||||
PostGIS 1.4.0 2009-07-24
|
||||
PostGIS 1.5.0 2010-02-04
|
||||
PostGIS 2.0.0 2012-04-03
|
||||
PostGIS 2.1.0 2013-08-17
|
||||
|
|
|
@ -61,7 +61,7 @@ supported versions, and any notes for each of the supported database backends:
|
|||
================== ============================== ================== =========================================
|
||||
Database Library Requirements Supported Versions Notes
|
||||
================== ============================== ================== =========================================
|
||||
PostgreSQL GEOS, PROJ.4, PostGIS 8.4+ Requires PostGIS.
|
||||
PostgreSQL GEOS, PROJ.4, PostGIS 9.0+ Requires PostGIS.
|
||||
MySQL GEOS 5.x Not OGC-compliant; :ref:`limited functionality <mysql-spatial-limitations>`.
|
||||
Oracle GEOS 10.2, 11 XE not supported; not tested with 9.
|
||||
SQLite GEOS, GDAL, PROJ.4, SpatiaLite 3.6.+ Requires SpatiaLite 2.3+, pysqlite2 2.5+
|
||||
|
@ -107,8 +107,7 @@ Add Google projection to ``spatial_ref_sys`` table
|
|||
|
||||
.. note::
|
||||
|
||||
If you're running PostGIS 1.4 or above, you can skip this step. The entry
|
||||
is already included in the default ``spatial_ref_sys`` table.
|
||||
If you're running GDAL 1.7 or above (most users), you can skip this step.
|
||||
|
||||
In order to conduct database transformations to the so-called "Google"
|
||||
projection (a spherical mercator projection used by Google Maps),
|
||||
|
@ -361,7 +360,7 @@ the `Apple Developer Tools`_ are required.
|
|||
|
||||
Summary::
|
||||
|
||||
$ sudo port install postgresql83-server
|
||||
$ sudo port install postgresql93-server
|
||||
$ sudo port install geos
|
||||
$ sudo port install proj
|
||||
$ sudo port install postgis
|
||||
|
@ -373,12 +372,12 @@ Summary::
|
|||
You will also have to modify the ``PATH`` in your ``.profile`` so
|
||||
that the MacPorts programs are accessible from the command-line::
|
||||
|
||||
export PATH=/opt/local/bin:/opt/local/lib/postgresql83/bin
|
||||
export PATH=/opt/local/bin:/opt/local/lib/postgresql93/bin
|
||||
|
||||
In addition, add the ``DYLD_FALLBACK_LIBRARY_PATH`` setting so that
|
||||
the libraries can be found by Python::
|
||||
|
||||
export DYLD_FALLBACK_LIBRARY_PATH=/opt/local/lib:/opt/local/lib/postgresql83
|
||||
export DYLD_FALLBACK_LIBRARY_PATH=/opt/local/lib:/opt/local/lib/postgresql93
|
||||
|
||||
__ http://www.macports.org/
|
||||
|
||||
|
|
|
@ -93,9 +93,7 @@ user. For example, you can use the following to become the ``postgres`` user::
|
|||
|
||||
The location *and* name of the PostGIS SQL files (e.g., from
|
||||
``POSTGIS_SQL_PATH`` below) depends on the version of PostGIS.
|
||||
PostGIS versions 1.3 and below use ``<pg_sharedir>/contrib/lwpostgis.sql``;
|
||||
whereas version 1.4 uses ``<sharedir>/contrib/postgis.sql`` and
|
||||
version 1.5 uses ``<sharedir>/contrib/postgis-1.5/postgis.sql``.
|
||||
Version 1.5 uses ``<sharedir>/contrib/postgis-1.5/postgis.sql``.
|
||||
|
||||
To complicate matters, Debian/Ubuntu distributions have their own separate
|
||||
directory naming system that might change with time. In this case, use the
|
||||
|
@ -128,8 +126,6 @@ the following scripts are available:
|
|||
=============== =============================================
|
||||
PostGIS version Bash shell script
|
||||
=============== =============================================
|
||||
1.3 :download:`create_template_postgis-1.3.sh`
|
||||
1.4 :download:`create_template_postgis-1.4.sh`
|
||||
1.5 :download:`create_template_postgis-1.5.sh`
|
||||
Debian/Ubuntu :download:`create_template_postgis-debian.sh`
|
||||
=============== =============================================
|
||||
|
|
|
@ -784,13 +784,15 @@ available with the :class:`~django.contrib.gis.admin.GeoModelAdmin`
|
|||
|
||||
First, there are some important requirements:
|
||||
|
||||
* :class:`~django.contrib.gis.admin.OSMGeoAdmin` requires that the
|
||||
:ref:`spherical mercator projection be added <addgoogleprojection>`
|
||||
to the ``spatial_ref_sys`` table (PostGIS 1.3 and below, only).
|
||||
* :class:`~django.contrib.gis.admin.OSMGeoAdmin` requires that
|
||||
:ref:`GDAL <ref-gdal>` is installed. If you are running GDAL 1.6 (uncommon)
|
||||
you will also need to add the :ref:`spherical mercator projection
|
||||
<addgoogleprojection>` to the ``spatial_ref_sys`` table.
|
||||
|
||||
* The PROJ.4 datum shifting files must be installed (see the
|
||||
:ref:`PROJ.4 installation instructions <proj4>` for more details).
|
||||
|
||||
If you meet these requirements, then just substitute the ``OSMGeoAdmin``
|
||||
If you meet this requirement, then just substitute the ``OSMGeoAdmin``
|
||||
option class in your ``admin.py`` file::
|
||||
|
||||
admin.site.register(WorldBorder, admin.OSMGeoAdmin)
|
||||
|
|
|
@ -92,7 +92,7 @@ below for information on how to set up your database correctly.
|
|||
PostgreSQL notes
|
||||
================
|
||||
|
||||
Django supports PostgreSQL 8.4 and higher.
|
||||
Django supports PostgreSQL 9.0 and higher.
|
||||
|
||||
PostgreSQL connection settings
|
||||
-------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue