Make pointcloud and pointcloud_postgis versions match

Previously the version of pointcloud was 1.1.0 while the version of
pointcloud_postgis was 1.0.0. With this commit we ensure that the
versions are the same.

This commit also adds a PC_PostGIS_Version function that returns
the version of the pointcloud_postgis extension.
This commit is contained in:
Éric Lemoine 2018-04-25 18:31:12 +02:00
parent 83ddc8e292
commit b5a205c8f2
4 changed files with 21 additions and 2 deletions

2
.gitignore vendored
View File

@ -15,3 +15,5 @@ Makefile
*/*/Makefile
pgsql/pointcloud.control
pgsql/pointcloud--*
pgsql_postgis/pointcloud_postgis.control
pgsql_postgis/pointcloud_postgis--*

View File

@ -4,8 +4,12 @@ include ../config.mk
#MODULE_big = pointcloud_postgis
#OBJS =
SED = sed
EXTENSION = pointcloud_postgis
DATA = $(EXTENSION)--1.0.sql
EXTVERSION=$(shell cat ../Version.config)
DATA_built = \
$(EXTENSION).control \
$(EXTENSION)--$(EXTVERSION).sql
#REGRESS = pointcloud
@ -15,3 +19,9 @@ DATA = $(EXTENSION)--1.0.sql
# We are going to use PGXS for sure
include $(PGXS)
$(EXTENSION).control: $(EXTENSION).control.in Makefile
$(SED) -e 's/@POINTCLOUD_VERSION@/$(EXTVERSION)/' $< > $@
$(EXTENSION)--$(EXTVERSION).sql: $(EXTENSION).sql.in Makefile
$(SED) -e 's/@POINTCLOUD_VERSION@/$(EXTVERSION)/' $< > $@

View File

@ -1,6 +1,6 @@
# pointcloud postgis integration extension
comment = 'integration for pointcloud LIDAR data and PostGIS geometry data'
default_version = '1.0'
default_version = '@POINTCLOUD_VERSION@'
relocatable = true
superuser = false
requires = 'postgis, pointcloud'

View File

@ -72,3 +72,10 @@ CREATE OR REPLACE FUNCTION PC_BoundingDiagonalGeometry(pcpatch)
SELECT ST_GeomFromEWKB(PC_BoundingDiagonalAsBinary($1))
$$
LANGUAGE 'sql';
-----------------------------------------------------------------------------
-- Function returning the version number
--
CREATE OR REPLACE FUNCTION PC_PostGIS_Version()
RETURNS text AS $$ SELECT '@POINTCLOUD_VERSION@'::text $$
LANGUAGE 'sql' IMMUTABLE STRICT;