From: Mark Cave-Ayland Date: Thu, 15 Jan 2009 15:10:21 +0000 (+0000) Subject: Fix the output of "SELECT postgis_full_version()" on trunk by ensuring that USE_STATS... X-Git-Tag: 1.4.0b1~307 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e607b8d8b937037c2b5567ab2d7dbec6daed2129;p=postgis Fix the output of "SELECT postgis_full_version()" on trunk by ensuring that USE_STATS is present, and correctly generating the POSTGIS_SCRIPTS_VERSION variable so that installations of trunk don't keep thinking that they need a scripts upgrade. git-svn-id: http://svn.osgeo.org/postgis/trunk@3529 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/lwgeom/lwgeom_functions_basic.c b/lwgeom/lwgeom_functions_basic.c index 98985bcf7..57550b1b8 100644 --- a/lwgeom/lwgeom_functions_basic.c +++ b/lwgeom/lwgeom_functions_basic.c @@ -173,11 +173,7 @@ Datum postgis_scripts_released(PG_FUNCTION_ARGS) PG_FUNCTION_INFO_V1(postgis_uses_stats); Datum postgis_uses_stats(PG_FUNCTION_ARGS) { -#ifdef USE_STATS PG_RETURN_BOOL(TRUE); -#else - PG_RETURN_BOOL(FALSE); -#endif } PG_FUNCTION_INFO_V1(postgis_autocache_bbox); diff --git a/lwgeom/lwpostgis.sql.in.c b/lwgeom/lwpostgis.sql.in.c index 8cf003593..f6c8aff71 100644 --- a/lwgeom/lwpostgis.sql.in.c +++ b/lwgeom/lwpostgis.sql.in.c @@ -3465,7 +3465,7 @@ CREATEFUNCTION postgis_proj_version() RETURNS text -- Do not modify this w/out also changing postgis_proc_upgrade.pl -- CREATEFUNCTION postgis_scripts_installed() RETURNS text - AS _POSTGIS_SQL_SELECT_POSTGIS_VERSION + AS _POSTGIS_SQL_SELECT_POSTGIS_SCRIPTS_VERSION LANGUAGE 'sql' _IMMUTABLE; CREATEFUNCTION postgis_lib_version() RETURNS text diff --git a/lwgeom/sqldefines.h.in b/lwgeom/sqldefines.h.in index ea765e315..47eb6220a 100644 --- a/lwgeom/sqldefines.h.in +++ b/lwgeom/sqldefines.h.in @@ -15,6 +15,7 @@ */ #define _POSTGIS_SQL_SELECT_POSTGIS_VERSION 'SELECT ''@POSTGIS_VERSION@''::text AS version' #define _POSTGIS_SQL_SELECT_POSTGIS_BUILD_DATE 'SELECT ''@POSTGIS_BUILD_DATE@''::text AS version' +#define _POSTGIS_SQL_SELECT_POSTGIS_SCRIPTS_VERSION 'SELECT ''@POSTGIS_SCRIPTS_VERSION@''::text AS version' #define CREATEFUNCTION CREATE OR REPLACE FUNCTION