Commit 5f67979a authored by Bas Couwenberg's avatar Bas Couwenberg

Imported Upstream version 2.3.0+dfsg

parent 28814812
This diff is collapsed.
PostGIS 2.3.0
2016/XX/XX
2016/09/26
* Important / Breaking Changes *
......@@ -26,7 +26,9 @@ PostGIS 2.3.0
- #454, ST_WrapX and lwgeom_wrapx (Sandro Santilli)
- #1758, ST_Normalize (Sandro Santilli)
- #2236, shp2pgsql -d now emits "DROP TABLE IF EXISTS"
- #2259, ST_Voronoi (Dan Baston)
- #2259, ST_VoronoiPolygons and ST_VoronoiLines (Dan Baston)
- #2841 and #2996, ST_MinimumBoundingRadius and new ST_MinimumBoundingCircle
implementation using Welzl's algorithm (Dan Baston)
- #2991, Enable ST_Transform to use PROJ.4 text (Mike Toews)
- #3059, Allow passing per-dimension parameters in ST_Expand (Dan Baston)
- #3339, ST_GeneratePoints (Paul Ramsey)
......@@ -49,7 +51,11 @@ PostGIS 2.3.0
Should resolve once and for all for extensions #3494, #3486, #3076
- #3547, Update tiger geocoder to support TIGER 2016
and to support both http and ftp.
- #3613, Segmentize geography using equal length segments
(Hugo Mercier of Oslandia)
* Bug Fixes
- #2841, ST_MinimumBoundingCircle not covering original
* Performance Enhancements *
- #75, Enhancement to PIP short circuit (Dan Baston)
......@@ -57,8 +63,7 @@ PostGIS 2.3.0
(Dan Baston)
- #3400, Minor optimization of PIP routines (Dan Baston)
- Make adding a line to topology interruptible (Sandro Santilli)
- #3613, Segmentize geography using equal length segments
(Hugo Mercier of Oslandia)
- Documentation updates from Mike Toews
PostGIS 2.3.0beta1
2016/09/06
......
PostGIS - Geographic Information Systems Extensions to PostgreSQL
=================================================================
:Version: 2.3.0beta1
:Date: 2016-09-06
:Version: 2.3.0
:Date: 2016-09-26
:Website: http://postgis.net
This distribution contains a module which implements GIS simple features, ties
......
......@@ -5,7 +5,7 @@
POSTGIS_MAJOR_VERSION=2
POSTGIS_MINOR_VERSION=3
POSTGIS_MICRO_VERSION=0rc1
POSTGIS_MICRO_VERSION=0
# Liblwgeom interface versioning, reset to 0:0:0 (cur:age:rev)
# when changing POSTGIS_MINOR_VERSION
......
......@@ -412,6 +412,73 @@ SELECT topology.AddTopoGeometryColumn('ri_topo', 'ri', 'roads', 'topo', 'LINE');
<para><xref linkend="AddTopoGeometryColumn"/></para>
</refsection>
</refentry>
<refentry id="Populate_Topology_Layer">
<refnamediv>
<refname>Populate_Topology_Layer</refname>
<refpurpose>Adds missing entries to topology.layer table by reading metadata from topo tables.</refpurpose>
</refnamediv>
<refsynopsisdiv>
<funcsynopsis>
<funcprototype>
<funcdef>setof record <function>Populate_Topology_Layer</function></funcdef>
<paramdef></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsection>
<title>Description</title>
<para>Adds missing entries to the <varname>topology.layer</varname> table by inspecting topology constraints on tables.
This function is useful for fixing up entries in topology catalog after restores of schemas with topo data.</para>
<para>It returns the list of entries created. Returned columns are <varname>schema_name</varname>, <varname>table_name</varname>, <varname>feature_column</varname>.</para>
<!-- use this format if new function -->
<para>Availability: 2.3.0</para>
</refsection>
<refsection>
<title>Examples</title>
<programlisting>SELECT CreateTopology('strk_topo');
CREATE SCHEMA strk;
CREATE TABLE strk.parcels(gid serial, parcel_id varchar(20) PRIMARY KEY, address text);
SELECT topology.AddTopoGeometryColumn('strk_topo', 'strk', 'parcels', 'topo', 'POLYGON');
-- this will return no records because this feature is already registered
SELECT *
FROM topology.Populate_Topology_Layer();
-- let's rebuild
TRUNCATE TABLE topology.layer;
SELECT *
FROM topology.Populate_Topology_Layer();
SELECT topology_id,layer_id, schema_name As sn, table_name As tn, feature_column As fc
FROM topology.layer;
</programlisting>
<screen> schema_name | table_name | feature_column
-------------+------------+----------------
strk | parcels | topo
(1 row)
topology_id | layer_id | sn | tn | fc
-------------+----------+------+---------+------
2 | 2 | strk | parcels | topo
(1 row)</screen>
</refsection>
<!-- Optionally add a "See Also" section -->
<refsection>
<title>See Also</title>
<para><xref linkend="AddTopoGeometryColumn"/></para>
</refsection>
</refentry>
<refentry id="TopologySummary">
<refnamediv>
......
......@@ -142,17 +142,21 @@ VACUUM FULL ANALYZE mytable;</programlisting>
<sect1 id="database_tuning_configuration">
<title>Tuning your configuration</title>
<para>These tips are taken from Kevin Neufeld's presentation "Tips for the
PostGIS Power User" at the FOSS4G 2007 conference. Depending on your
use of PostGIS (for example, static data and complex analysis vs frequently
updated data and lots of users) these changes can provide significant
speedups to your queries.</para>
<para>For a more tips (and better formatting), the original presentation
is at
<ulink url="http://2007.foss4g.org/presentations/view.php?abstract_id=117">
http://2007.foss4g.org/presentations/view.php?abstract_id=117</ulink>.
</para>
<para>Tuning for PostGIS is much like tuning for any PostgreSQL workload. The only additional note to keep in mind is that
geometries and rasters are heavy so memory related optimizations generally have more of an impact on PostGIS than other types of PostgreSQL queries.</para>
<para>For general details about optimizing PostgreSQL, refer to <ulink url="https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server">Tuning your PostgreSQL Server</ulink>.</para>
<para>For PostgreSQL 9.4+ all these can be set at the server level without touching postgresql.conf or postgresql.auto.conf
by using the <code>ALTER SYSTEM..</code> command.</para>
<programlisting>ALTER SYSTEM SET work_mem = '256MB';
-- this will force, non-startup configs to take effect for new connections
SELECT pg_reload_conf();
-- show current setting value
-- use SHOW ALL to see all settings
SHOW work_mem;</programlisting>
<para>In addition to these settings, PostGIS also has some custom settings which you can find listed in <xref linkend="PostGIS_GUC" />.</para>
<sect2>
<title>Startup</title>
......@@ -162,62 +166,59 @@ VACUUM FULL ANALYZE mytable;</programlisting>
</para>
<para>
<ulink url="http://www.postgresql.org/docs/current/static/runtime-config-wal.html#GUC-CHECKPOINT-SEGMENTS">checkpoint_segments</ulink>
<ulink url="http://www.postgresql.org/docs/current/static/runtime-config-query.html#GUC-CONSTRAINT-EXCLUSION">constraint_exclusion</ulink>
</para>
<itemizedlist>
<listitem>
<para>
Maximum number of log file segments between automatic WAL checkpoints
(each segment is normally 16MB); default is 3
</para>
</listitem>
<listitem>
<para>
Set to at least 10 or 30 for databases with heavy write activity, or
more for large database loads. Another article on the topic worth reading <ulink url="http://www.westnet.com/~gsmith/content/postgresql/chkp-bgw-83.htm">Greg Smith: Checkpoint and Background writer</ulink>
Default: partition
</para>
</listitem>
<listitem>
<para>
Possibly store the xlog on a separate disk device
This is generally used for table partitioning. The default for this is set to "partition" which is ideal for PostgreSQL 8.4 and above since
it will force the planner to only analyze tables for constraint consideration if they are in an inherited hierarchy
and not pay the planner penalty otherwise.
</para>
</listitem>
</itemizedlist>
<para>
<ulink url="http://www.postgresql.org/docs/current/static/runtime-config-query.html#GUC-CONSTRAINT-EXCLUSION">constraint_exclusion</ulink>
<ulink url="http://www.postgresql.org/docs/current/static/runtime-config-resource.html#GUC-SHARED-BUFFERS">shared_buffers</ulink>
</para>
<itemizedlist>
<listitem>
<para>
Default: off (prior to PostgreSQL 8.4 and for PostgreSQL 8.4+ is set to partition)
Default: ~32MB
</para>
</listitem>
<listitem>
<para>
This is generally used for table partitioning. If you are running PostgreSQL versions below 8.4, set to "on" to ensure the query planner will optimize as desired.
As of PostgreSQL 8.4, the default for this is set to "partition" which is ideal for PostgreSQL 8.4 and above since
it will force the planner to only analyze tables for constraint consideration if they are in an inherited hierarchy
and not pay the planner penalty otherwise.
Set to about 1/3 to 3/4 of available RAM
</para>
</listitem>
</itemizedlist>
<para>
<ulink url="http://www.postgresql.org/docs/current/static/runtime-config-resource.html#GUC-SHARED-BUFFERS">shared_buffers</ulink>
<para>
<ulink url="https://www.postgresql.org/docs/current/static/runtime-config-resource.html#GUC-MAX-WORKER-PROCESSES">max_worker_processes</ulink>
This setting is only available for PostgreSQL 9.4+. For PostgreSQL 9.6+ this setting has additional importance in that it controls the
max number of processes you can have for parallel queries.
</para>
<itemizedlist>
<listitem>
<para>
Default: ~32MB
Default: 8
</para>
</listitem>
<listitem>
<para>
Set to about 1/3 to 3/4 of available RAM
Sets the maximum number of background processes that
the system can support. This parameter can only be set at
server start.
</para>
</listitem>
</itemizedlist>
......@@ -233,7 +234,7 @@ VACUUM FULL ANALYZE mytable;</programlisting>
<itemizedlist>
<listitem>
<para>
Default: 1MB
Default: 1-4MB
</para>
</listitem>
<listitem>
......@@ -250,7 +251,7 @@ VACUUM FULL ANALYZE mytable;</programlisting>
<para>
If you have lots of RAM and few developers:
<programlisting>
SET work_mem TO 1200000;
SET work_mem TO '256MB';;
</programlisting>
</para>
</listitem>
......@@ -263,7 +264,7 @@ VACUUM FULL ANALYZE mytable;</programlisting>
<itemizedlist>
<listitem>
<para>
Default: 16MB
Default: 16-64MB
</para>
</listitem>
<listitem>
......@@ -273,14 +274,43 @@ VACUUM FULL ANALYZE mytable;</programlisting>
</listitem>
<listitem>
<para>
Recommend 32MB to 256MB on production servers w/lots of RAM, but depends
Recommend 32MB to 1GB on production servers w/lots of RAM, but depends
on the # of concurrent users. If you have lots of RAM and few developers:
<programlisting>
SET maintainence_work_mem TO 1200000;
SET maintenance_work_mem TO '1GB';
</programlisting>
</para>
</listitem>
</itemizedlist>
<para>
<ulink url="https://www.postgresql.org/docs/current/static/runtime-config-resource.html#GUC-MAX-PARALLEL-WORKERS-PER-GATHER">max_parallel_workers_per_gather</ulink>
This setting is only available for PostgreSQL 9.6+ and will only affect PostGIS 2.3+, since only PostGIS 2.3+ supports parallel queries.
If set to higher than 0, then some queries such as those involving relation functions like <code>ST_Intersects</code> can use multiple processes and can run
more than twice as fast when doing so. If you have a lot of processors to spare, you should change the value of this to as many processors as you have.
Also make sure to bump up <code>max_worker_processes</code> to at least as high as this number.
</para>
<itemizedlist>
<listitem>
<para>
Default: 0
</para>
</listitem>
<listitem>
<para>
Sets the maximum number of workers that can be started
by a single <varname>Gather</varname> node.
Parallel workers are taken from the pool of processes
established by <varname>max_worker_processes</varname>.
Note that the requested number of workers may not
actually be available at run time. If this occurs, the
plan will run with fewer workers than expected, which may
be inefficient. Setting this value to 0, which is the
default, disables parallel query execution.
</para>
</listitem>
</itemizedlist>
</sect2>
......
......@@ -2,7 +2,102 @@
<appendix id="release_notes">
<title>Appendix</title>
<subtitle>Release Notes</subtitle>
<sect1>
<title>Release 2.3.0</title>
<para>Release date: 2016/09/26</para>
<para>This is a new feature release, with new functions, improved performance, all relevant bug fixes from PostGIS 2.2.3,and other goodies.</para>
<simplesect>
<title>Important / Breaking Changes</title>
<para>#3466, Casting from box3d to geometry now returns a 3D
geometry (Julien Rouhaud of Dalibo)</para>
<para>#3396, ST_EstimatedExtent, throw WARNING instead of ERROR
(Regina Obe)</para>
</simplesect>
<simplesect>
<title>New Features</title>
<para>Add support for custom TOC in postgis_restore.pl
(Christoph Moench-Tegeder)</para>
<para>Add support for negative indexing in ST_PointN and ST_SetPoint
(Rémi Cura)</para>
<para>Add parameters for geography ST_Buffer (Thomas Bonfort)</para>
<para>TopoGeom_addElement, TopoGeom_remElement (Sandro Santilli)</para>
<para>populate_topology_layer (Sandro Santilli)</para>
<para>#454, ST_WrapX and lwgeom_wrapx (Sandro Santilli)</para>
<para>#1758, ST_Normalize (Sandro Santilli)</para>
<para>#2236, shp2pgsql -d now emits "DROP TABLE IF EXISTS"</para>
<para>#2259, ST_VoronoiPolygons and ST_VoronoiLines (Dan Baston)</para>
<para>#2841 and #2996, ST_MinimumBoundingRadius and new ST_MinimumBoundingCircle
implementation using Welzl's algorithm (Dan Baston)</para>
<para>#2991, Enable ST_Transform to use PROJ.4 text (Mike Toews)</para>
<para>#3059, Allow passing per-dimension parameters in ST_Expand (Dan Baston)</para>
<para>#3339, ST_GeneratePoints (Paul Ramsey)</para>
<para>#3362, ST_ClusterDBSCAN (Dan Baston)</para>
<para>#3364, ST_GeometricMedian (Dan Baston)</para>
<para>#3391, Add table inheritance support in ST_EstimatedExtent
(Alessandro Pasotti)</para>
<para>#3424, ST_MinimumClearance (Dan Baston)</para>
<para>#3428, ST_Points (Dan Baston)</para>
<para>#3465, ST_ClusterKMeans (Paul Ramsey)</para>
<para>#3469, ST_MakeLine with MULTIPOINTs (Paul Norman)</para>
<para>#3549, Support PgSQL 9.6 parallel query mode, as far as possible
(Paul Ramsey, Regina Obe)</para>
<para>#3557, Geometry function costs based on query stats (Paul Norman)</para>
<para>#3591, Add support for BRIN indexes. PostgreSQL 9.4+ required.
(Giuseppe Broccolo of 2nd Quadrant, Julien Rouhaud
and Ronan Dunklau of Dalibo)</para>
<para>#3496, Make postgis non-relocateable for extension install,
schema qualify calls in functions (Regina Obe)
Should resolve once and for all for extensions #3494, #3486, #3076</para>
<para>#3547, Update tiger geocoder to support TIGER 2016
and to support both http and ftp.</para>
<para>#3613, Segmentize geography using equal length segments
(Hugo Mercier of Oslandia)</para>
</simplesect>
<simplesect>
<title>Bug Fixes</title>
<para>All relevant bug fixes from PostGIS 2.2.3</para>
<para>#2841, ST_MinimumBoundingCircle not covering original</para>
<para>#3604, pgcommon/Makefile.in orders CFLAGS incorrectly leading to
wrong liblwgeom.h (Greg Troxel)</para>
</simplesect>
<simplesect>
<title>Performance Enhancements</title>
<para>#75, Enhancement to PIP short circuit (Dan Baston)</para>
<para>#3383, Avoid deserializing small geometries during index operations
(Dan Baston)</para>
<para>#3400, Minor optimization of PIP routines (Dan Baston)</para>
<para>Make adding a line to topology interruptible (Sandro Santilli)</para>
<para>Documentation updates from Mike Toews</para>
</simplesect>
</sect1>
<sect1>
<title>Release 2.2.2</title>
<para>Release date: 2016/03/22</para>
<para>This is a bug fix and performance improvement release.</para>
<simplesect>
<title>New Features</title>
<para>#3463, Fix crash on face-collapsing edge change</para>
<para>#3422, Improve ST_Split robustness on standard precision double systems (arm64, ppc64el, s390c, powerpc, ...)</para>
<para>#3427, Update spatial_ref_sys to EPSG version 8.8</para>
<para>#3433, ST_ClusterIntersecting incorrect for MultiPoints</para>
<para>#3435, ST_AsX3D fix rendering of concave geometries</para>
<para>#3436, memory handling mistake in ptarray_clone_deep</para>
<para>#3437, ST_Intersects incorrect for MultiPoints</para>
<para>#3461, ST_GeomFromKML crashes Postgres when there are innerBoundaryIs and no outerBoundaryIs</para>
<para>#3429, upgrading to 2.3 or from 2.1 can cause loop/hang on some platforms</para>
<para>#3460, ST_ClusterWithin 'Tolerance not defined' error after upgrade</para>
<para>#3490, Raster data restore issues, materialized views. Scripts postgis_proc_set_search_path.sql, rtpostgis_proc_set_search_path.sql refer to http://postgis.net/docs/manual-2.2/RT_FAQ.html#faq_raster_data_not_restore</para>
<para>#3426, failing POINT EMPTY tests on fun architectures</para>
</simplesect>
</sect1>
<sect1>
<title>Release 2.2.1</title>
<para>Release date: 2016/01/06</para>
......
......@@ -17,6 +17,8 @@ COMMENT ON FUNCTION topology.DropTopology(varchar ) IS 'args: topology_schema_na
COMMENT ON FUNCTION topology.DropTopoGeometryColumn(varchar , varchar , varchar ) IS 'args: schema_name, table_name, column_name - Drops the topogeometry column from the table named table_name in schema schema_name and unregisters the columns from topology.layer table.';
COMMENT ON FUNCTION topology.Populate_Topology_Layer() IS 'Adds missing entries to topology.layer table by reading metadata from topo tables.';
COMMENT ON FUNCTION topology.TopologySummary(varchar ) IS 'args: topology_schema_name - Takes a topology name and provides summary totals of types of objects in topology';
COMMENT ON FUNCTION topology.ValidateTopology(varchar ) IS 'args: topology_schema_name - Returns a set of validatetopology_returntype objects detailing issues with topology';
......
......@@ -11,7 +11,7 @@
<xsl:variable name='testversion'>2.3.0</xsl:variable>
<xsl:variable name='fnexclude14'>AddGeometryColumn DropGeometryColumn DropGeometryTable</xsl:variable>
<xsl:variable name='fnexclude'>AddGeometryColumn DropGeometryColumn DropGeometryTable</xsl:variable>
<!--This is just a place holder to state functions not supported in 1.3 or tested separately -->
<!--This is just a place holder to state functions not supported or tested separately -->
<xsl:variable name='var_srid'>3395</xsl:variable>
<xsl:variable name='var_position'>1</xsl:variable>
......@@ -314,6 +314,14 @@ BEGIN;
COMMIT;
SELECT '<xsl:value-of select="$log_label" /> geometry index: End Testing <xsl:value-of select="@ID" />';
SELECT '<xsl:value-of select="$log_label" /> Geometry brin index: Start Testing <xsl:value-of select="@ID" />';
INSERT INTO <xsl:value-of select="$var_logtable" />(log_label, func, g1, log_start) VALUES('<xsl:value-of select="$log_label" /> brin index Geometry','CREATE brin index geometry', '<xsl:value-of select="@ID" />', clock_timestamp());
BEGIN;
CREATE INDEX idx_pgis_geom_brin ON pgis_garden USING brin(the_geom);
<xsl:value-of select="$var_logupdatesql" />
COMMIT;
SELECT '<xsl:value-of select="$log_label" /> geometry brin index: End Testing <xsl:value-of select="@ID" />';
INSERT INTO <xsl:value-of select="$var_logtable" />(log_label, func, g1, log_start, log_sql)
VALUES('<xsl:value-of select="$log_label" /> insert data Geometry','insert data', '<xsl:value-of select="@ID" />', clock_timestamp(), '<xsl:call-template name="escapesinglequotes">
......@@ -388,6 +396,14 @@ BEGIN;
COMMIT;
SELECT '<xsl:value-of select="$log_label" /> Geography index: End Testing <xsl:value-of select="@ID" />';
SELECT '<xsl:value-of select="$log_label" /> Geography brin index: Start Testing <xsl:value-of select="@ID" />';
INSERT INTO <xsl:value-of select="$var_logtable" />(log_label, func, g1, log_start) VALUES('<xsl:value-of select="$log_label" /> brin index Geography','CREATE brin index geography', '<xsl:value-of select="@ID" />', clock_timestamp());
BEGIN;
CREATE INDEX idx_pgis_geoggarden_geog_brin ON pgis_geoggarden USING brin(the_geog);
<xsl:value-of select="$var_logupdatesql" />
COMMIT;
SELECT '<xsl:value-of select="$log_label" /> Geography brin index: End Testing <xsl:value-of select="@ID" />';
<!-- vacuum analyze can't be put in a commit so we can't completely tell if it completes if it doesn't crash -->
INSERT INTO <xsl:value-of select="$var_logtable" />(log_label, func, g1, log_start, log_sql) VALUES('<xsl:value-of select="$log_label" /> vacuum analyze Geography','analyze geography table', '<xsl:value-of select="@ID" />', clock_timestamp(),
......
......@@ -30,14 +30,14 @@ POSTGIS_PGSQL_VERSION=95
SQLPP = /usr/bin/cpp -traditional-cpp -w -P
GREP=/bin/grep
PERL=/usr/bin/perl
EXTVERSION = 2.3.0rc1
EXTVERSION = 2.3.0
MINORVERSION = 2.3
MODULE_big = address_standardizer-2.3
EXTENSION = address_standardizer
DATA = address_standardizer_data_us.control sql/$(EXTENSION).sql sql/$(EXTENSION)_data_us.sql
all: sql/address_standardizer.sql sql/address_standardizer--1.0--$(EXTVERSION).sql sql/address_standardizer--$(EXTVERSION).sql sql/address_standardizer--$(EXTVERSION)--$(EXTVERSION)next.sql sql/address_standardizer--$(EXTVERSION)next--$(EXTVERSION).sql \
sql/$(EXTENSION)_data_us.sql sql/address_standardizer--2.3.0rc1.sql sql/$(EXTENSION)_data_us--2.3.0rc1.sql sql/$(EXTENSION)_data_us--$(EXTVERSION)--$(EXTVERSION)next.sql \
sql/$(EXTENSION)_data_us.sql sql/address_standardizer--2.3.0.sql sql/$(EXTENSION)_data_us--2.3.0.sql sql/$(EXTENSION)_data_us--$(EXTVERSION)--$(EXTVERSION)next.sql \
sql/$(EXTENSION)_data_us--$(EXTVERSION)next--$(EXTVERSION).sql \
sql/test-init-extensions.sql sql/test-parseaddress.sql sql/test-standardize_address_1.sql sql/test-standardize_address_2.sql
......@@ -68,7 +68,7 @@ sql/%.sql: %.sql.in
$(SQLPP) -I../libpgcommon $< | grep -v '^#' | \
$(PERL) -lpe "s'MODULE_PATHNAME'\$$libdir/${EXTENSION}-${MINORVERSION}'g" > $@
sql/address_standardizer--2.3.0rc1.sql: sql/address_standardizer_types.sql \
sql/address_standardizer--2.3.0.sql: sql/address_standardizer_types.sql \
sql/address_standardizer_functions.sql
cat $^ > $@
......
# address_standardizer extension
comment = 'Used to parse an address into constituent elements. Generally used to support geocoding address normalization step.'
default_version = '2.3.0rc1'
default_version = '2.3.0'
relocatable = true
# address standardizer us dataset
comment = 'Address Standardizer US dataset example'
default_version = '2.3.0rc1'
default_version = '2.3.0'
relocatable = true
include ../upgradeable_versions.mk
EXTENSION = postgis
EXTVERSION = 2.3.0rc1
EXTVERSION = 2.3.0
MINORVERSION = 2.3
GREP = /bin/grep
PERL = /usr/bin/perl
......@@ -77,7 +77,7 @@ sql_bits/rtpostgis.sql: ../../raster/rt_pg/rtpostgis_for_extension.sql
$(PERL) -pe 's/BEGIN\;//g ; s/COMMIT\;//g' $< > $@
sql_bits/spatial_ref_sys_config_dump.sql: ../../spatial_ref_sys.sql ../../utils/create_spatial_ref_sys_config_dump.pl
../../utils/create_spatial_ref_sys_config_dump.pl $< > $@
$(PERL) ../../utils/create_spatial_ref_sys_config_dump.pl $< > $@
sql_bits/rtpostgis_upgrade.sql: ../../raster/rt_pg/rtpostgis_upgrade_for_extension.sql
$(PERL) -pe "s/BEGIN\;//g ; s/COMMIT\;//g; s/^(DROP .*)\;/SELECT postgis_extension_drop_if_exists('$(EXTENSION)', '\1');\n\1\;/" $< > $@
......
......@@ -77,7 +77,7 @@ sql_bits/rtpostgis.sql: ../../raster/rt_pg/rtpostgis_for_extension.sql
$(PERL) -pe 's/BEGIN\;//g ; s/COMMIT\;//g' $< > $@
sql_bits/spatial_ref_sys_config_dump.sql: ../../spatial_ref_sys.sql ../../utils/create_spatial_ref_sys_config_dump.pl
../../utils/create_spatial_ref_sys_config_dump.pl $< > $@
$(PERL) ../../utils/create_spatial_ref_sys_config_dump.pl $< > $@
sql_bits/rtpostgis_upgrade.sql: ../../raster/rt_pg/rtpostgis_upgrade_for_extension.sql
$(PERL) -pe "s/BEGIN\;//g ; s/COMMIT\;//g; s/^(DROP .*)\;/SELECT postgis_extension_drop_if_exists('$(EXTENSION)', '\1');\n\1\;/" $< > $@
......
# postgis extension
comment = 'PostGIS geometry, geography, and raster spatial types and functions'
default_version = '2.3.0rc1'
default_version = '2.3.0'
module_pathname = '$libdir/postgis-2.3'
relocatable = false
include ../upgradeable_versions.mk
EXTENSION = postgis_sfcgal
EXTVERSION = 2.3.0rc1
EXTVERSION = 2.3.0
MINORVERSION = 2.3
GREP = /bin/grep
PERL = /usr/bin/perl
......
# postgis topology extension
comment = 'PostGIS SFCGAL functions'
default_version = '2.3.0rc1'
default_version = '2.3.0'
relocatable = true
requires = postgis
include ../upgradeable_versions.mk
EXTENSION = postgis_tiger_geocoder
EXTVERSION = 2.3.0rc1
EXTVERSION = 2.3.0
MINORVERSION = 2011.2.3
GREP = /bin/grep
PERL = /usr/bin/perl
......
# postgis tiger geocoder extension
comment = 'PostGIS tiger geocoder and reverse geocoder'
default_version = '2.3.0rc1'
default_version = '2.3.0'
relocatable = false
schema = tiger
requires = 'postgis,fuzzystrmatch'
include ../upgradeable_versions.mk
EXTENSION = postgis_topology
EXTVERSION = 2.3.0rc1
EXTVERSION = 2.3.0
MINORVERSION = 2.3
GREP = /bin/grep
PERL = /usr/bin/perl
......
# postgis topology extension
comment = 'PostGIS topology spatial types and functions'
default_version = '2.3.0rc1'
default_version = '2.3.0'
relocatable = false
schema = topology
requires = postgis
......@@ -20,9 +20,8 @@ UPGRADEABLE_VERSIONS = \
2.2.0 \
2.2.1 \
2.2.2 \
2.3.0dev \
2.3.0beta1 \
2.3.0rc1dev
2.2.3 \
2.3.0rc1
# This is to avoid forcing "check-installed-upgrades" as a default
# rule, see https://trac.osgeo.org/postgis/ticket/3420
......
......@@ -25,8 +25,8 @@ BEGIN
RETURN NULL;
END IF;
var_addr1 := to_number(in_addr1, '999999');
var_addr2 := to_number(in_addr2, '999999');
var_addr1 := to_number( CASE WHEN in_addr1 ~ '^[0-9]+$' THEN in_addr1 ELSE '0' END, '999999');
var_addr2 := to_number( CASE WHEN in_addr2 ~ '^[0-9]+$' THEN in_addr2 ELSE '0' END, '999999');
IF geometrytype(in_road) = 'LINESTRING' THEN
road := ST_Transform(in_road, utmzone(ST_StartPoint(in_road)) );
......
......@@ -697,7 +697,7 @@ BEGIN
END IF;
-- For address number only put numbers and stop if reach a non-number e.g. 123-456 will return 123
result.address := to_number(substring(addressString, '[0-9]+'), '99999999999');
result.address := to_number(substring(addressString, '[0-9]+'), '99999999');
--get rid of extraneous spaces before we return
result.zip := trim(zipString);
result.streetName := trim(result.streetName);
......
......@@ -31,7 +31,7 @@ BEGIN
COALESCE(', ' || var_parse_rec.city,'') || COALESCE(', ' || var_parse_rec.state, '') || COALESCE(' ' || var_parse_rec.zip,'') ) ;
-- For address number only put numbers and stop if reach a non-number e.g. 123-456 will return 123
result.address := to_number(substring(var_rec.house_num, '[0-9]+'), '99999999999');
result.address := to_number(substring(var_rec.house_num, '[0-9]+'), '99999999');
--get rid of extraneous spaces before we return
result.zip := COALESCE(var_rec.postcode,result.zip);
result.streetName := trim(var_rec.name);
......
......@@ -986,9 +986,9 @@ ptarray_signed_area(const POINTARRAY *pa)
P1 = getPoint2d_cp(pa, 0);
P2 = getPoint2d_cp(pa, 1);
x0 = P1->x;
for ( i = 1; i < pa->npoints - 1; i++ )
for ( i = 2; i < pa->npoints; i++ )
{
P3 = getPoint2d_cp(pa, i+1);
P3 = getPoint2d_cp(pa, i);
x = P2->x - x0;
y1 = P3->y;
y2 = P1->y;
......
......@@ -2380,7 +2380,7 @@ BEGIN
RETURN ret;
END;
$$
LANGUAGE 'plpgsql' STABLE STRICT _PARALLEL;
LANGUAGE 'plpgsql' STABLE STRICT;
----------------------------------------------------------------------------
-- ADDGEOMETRYCOLUMN ( <table>, <column>, <srid>, <type>, <dim> )
......
......@@ -9,7 +9,7 @@
#define POSTGIS_PGSQL_VERSION 95
#define POSTGIS_GEOS_VERSION 35
#define POSTGIS_PROJ_VERSION 49
#define POSTGIS_LIB_VERSION '2.3.0rc1'
#define POSTGIS_LIB_VERSION '2.3.0'
#define POSTGIS_LIBXML2_VERSION 2.9.4
#define POSTGIS_SFCGAL_VERSION 13
......@@ -25,12 +25,12 @@
* won't substitute within apostrophes)
*/
#define _POSTGIS_SQL_SELECT_POSTGIS_VERSION 'SELECT ''2.3 USE_GEOS=1 USE_PROJ=1 USE_STATS=1''::text AS version'
#define _POSTGIS_SQL_SELECT_POSTGIS_BUILD_DATE 'SELECT ''2016-09-19 05:38:21''::text AS version'
#define _POSTGIS_SQL_SELECT_POSTGIS_BUILD_DATE 'SELECT ''2016-09-26 13:11:37''::text AS version'
#if POSTGIS_SVN_REVISION
#define _POSTGIS_SQL_SELECT_POSTGIS_SCRIPTS_VERSION $$ SELECT '2.3.0rc1'::text || ' r' || POSTGIS_SVN_REVISION::text AS version $$
#define _POSTGIS_SQL_SELECT_POSTGIS_SCRIPTS_VERSION $$ SELECT '2.3.0'::text || ' r' || POSTGIS_SVN_REVISION::text AS version $$
#else
#define _POSTGIS_SQL_SELECT_POSTGIS_SCRIPTS_VERSION $$ SELECT '2.3.0rc1'::text AS version $$
#define _POSTGIS_SQL_SELECT_POSTGIS_SCRIPTS_VERSION $$ SELECT '2.3.0'::text AS version $$
#endif
#define SRID_USR_MAX 998999
......
#define POSTGIS_SVN_REVISION 15121
#define POSTGIS_SVN_REVISION 15146
This diff is collapsed.
......@@ -880,6 +880,13 @@ SELECT '#2870', ST_Summary('Point(151.215289 -33.856885)'::geometry::bytea::geog
SELECT '#2956', st_astwkb(null,0) is null;
-- #2965 --
CREATE TABLE test_analyze_crash (a integer not null, g geometry);
INSERT INTO test_analyze_crash values (1, '0102000020E6100000010000006D1092A47FF33440AD4ECD9B00334A40');
ANALYZE test_analyze_crash;
SELECT '#2965', ST_AsText(g) FROM test_analyze_crash;
DROP TABLE test_analyze_crash;
-- #2996 --
WITH
input AS (SELECT 'SRID=4326;POLYGON((26426 65078,26531 65242,26075 65136,26096 65427,26426 65078))'::geometry AS geom),
......
......@@ -269,6 +269,7 @@ ERROR: invalid GML representation
#2788|f|Self-intersection|POINT(1 1)
#2870|Point[GS]
#2956|t
#2965|LINESTRING(20.9511664253809 52.3984560730436)
#2996|t
#3119a|121
#3119b|291
......
......@@ -23,24 +23,30 @@ select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(4 10, 6 10)'))
select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(6 10, 6 7)'));
select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(6 7, 4 7)'));
select topology.addFace('schema_topo', 'POLYGON((1 2, 1 5, 10 5, 10 2, 1 2 ))');
select topology.addFace('schema_topo', 'POLYGON((10 2, 10 5, 10 12, 10 14, 10 15, 15 15, 15 2, 10 2))');
select topology.addFace('schema_topo', 'POLYGON((7 12, 7 15, 10 15, 10 14, 8 14, 8 12, 7 12))');
select topology.addFace('schema_topo', 'POLYGON((1 5, 1 12, 7 12, 8 12, 10 12, 10 5, 1 5),(4 7, 4 10, 6 10, 6 7, 4 7))');
select 'F1',topology.addFace('schema_topo', 'POLYGON((1 2, 1 5, 10 5, 10 2, 1 2 ))');
select 'F2',topology.addFace('schema_topo', 'POLYGON((10 2, 10 5, 10 12, 10 14, 10 15, 15 15, 15 2, 10 2))');
select 'F3',topology.addFace('schema_topo', 'POLYGON((7 12, 7 15, 10 15, 10 14, 8 14, 8 12, 7 12))');
select 'F4',topology.addFace('schema_topo', 'POLYGON((1 5, 1 12, 7 12, 8 12, 10 12, 10 5, 1 5),(4 7, 4 10, 6 10, 6 7, 4 7))');
select 'F5',topology.addFace('schema_topo', 'POLYGON((4 7,6 7,6 10,4 10,4 7))');
select 'F6',topology.addFace('schema_topo', 'POLYGON((8 12,8 14,10 14,10 12,8 12))');
-- ask for a Point with tolerance zero
select 't1', topology.GetFaceByPoint('schema_topo',ST_GeomFromText('POINT(7 7)'), 0::float8)::int;