Make sure postgis_sfcgal_full_version() is always

defined when postgis_sfcgal is installed.
Handle case for SFCGAL < 1.4.0
References https://trac.osgeo.org/postgis/ticket/5040 #5040
References https://git.osgeo.org/gitea/postgis/postgis/pulls/61
master
Regina Obe 2022-01-08 02:21:07 -05:00
parent 5c86e11523
commit 7ed2c1a17e
1 changed files with 5 additions and 1 deletions

View File

@ -27,11 +27,15 @@ CREATE OR REPLACE FUNCTION postgis_sfcgal_version() RETURNS text
AS 'MODULE_PATHNAME'
LANGUAGE 'c' IMMUTABLE;
#if POSTGIS_SFCGAL_VERSION >= 10400
-- Availability: 3.3.0
#if POSTGIS_SFCGAL_VERSION >= 10400
CREATE OR REPLACE FUNCTION postgis_sfcgal_full_version() RETURNS text
AS 'MODULE_PATHNAME'
LANGUAGE 'c' IMMUTABLE;
#else
CREATE OR REPLACE FUNCTION postgis_sfcgal_full_version() RETURNS text AS
'SELECT @extschema@.postgis_sfcgal_version();'
LANGUAGE 'sql' IMMUTABLE;
#endif
-- Availability: 3.0.0