gvSIG bugs #2170

Deal with versions of PostGIS on SQL creation

Added by Jorge Sanz over 10 years ago. Updated over 10 years ago.

Status:Closed% Done:

0%

Priority:NormalSpent time:-
Assignee:Juan Lucas Domínguez
Category:Database
Target version:2.1.0-2217-devel
Severity: Add-on version:
gvSIG version:2.1.0 Add-on build:
gvSIG build: Add-on resolve version:
Operative System: Add-on resolve build:
Keywords: Proyecto:
Has patch:No Hito:
Add-on name:Unknown

Description

Accessing new databases shouldn't require that the legacy.sql script has been run on it. For example from postgis 1.2.3 the AsBinary function is renamed to st_asbinary so if the postgis_version() function returns anything bigger than 1.2.3 the correct "st_" version of the function has to be called.

An analysis of which postgis functions are used on the driver has to be done, implementing a mechanism to select the proper function depending on the version of the database, allowing databases without the legacy.sql script.

This is an issue raised by the OSGeo Live DVD team, that wants to remove the need to load the legacy.sql from the LiveDVD creation, somewhat forcing applications to remove this dependency.

History

#1 Updated by Álvaro Anguix over 10 years ago

  • Assignee set to Juan Lucas Domínguez

#2 Updated by Juan Lucas Domínguez over 10 years ago

The current PostgreSQL plugin for gvSIG 2.1.0 uses always the new function names (ST...) so the osgeo DVD will not have problems with it (when gvSIG 2.1.0 is included in the DVD). So we need to implement the compatibility with old function names (the ones without ST).

#3 Updated by Álvaro Anguix over 10 years ago

  • Category set to Database

#4 Updated by Juan Lucas Domínguez over 10 years ago

Jorge, there is no PostGIS 1.2.3 in the official repo: http://svn.osgeo.org/postgis/tags/
Where did you read that the change was in PostGIS 1.2.3?
I'm going to use 1.3 as the border (we'll use "ST_" if version >= 1.3)

#5 Updated by Álvaro Anguix over 10 years ago

  • Target version set to 2.1.0-2218-testing

#6 Updated by Juan Lucas Domínguez over 10 years ago

  • Status changed from New to Fixed

Added support for versions of PostGIS < 1.3

gvsig-postgresql:r46

#7 Updated by Joaquín del Cerro Murciano over 10 years ago

  • Target version changed from 2.1.0-2218-testing to 2.1.0-2217-devel

#8 Updated by Álvaro Anguix over 10 years ago

  • Status changed from Fixed to Closed

Also available in: Atom PDF