-
-
Notifications
You must be signed in to change notification settings - Fork 382
/
sqldefines.h.in
62 lines (52 loc) · 1.97 KB
/
sqldefines.h.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef _LWPGIS_DEFINES
#define _LWPGIS_DEFINES
#include "../postgis_svn_revision.h"
/*
* Define just the version numbers; otherwise we get some strange substitutions in postgis.sql.in
*/
#define POSTGIS_PGSQL_VERSION @POSTGIS_PGSQL_VERSION@
#define POSTGIS_GEOS_VERSION @POSTGIS_GEOS_VERSION@
#define POSTGIS_PROJ_VERSION @POSTGIS_PROJ_VERSION@
#define POSTGIS_LIB_VERSION '@POSTGIS_LIB_VERSION@'
#define POSTGIS_LIBXML2_VERSION @POSTGIS_LIBXML2_VERSION@
#define POSTGIS_SFCGAL_VERSION @POSTGIS_SFCGAL_VERSION@
#if POSTGIS_PGSQL_VERSION >= 96
#define _PARALLEL PARALLEL SAFE
#define _PARALLEL_RESTRICTED PARALLEL RESTRICTED
#else
#define _PARALLEL
#define _PARALLEL_RESTRICTED
#endif
/*
* High costs can only be used for PostGIS 3/PgSQL 12
* where the support functions have been used in
* place of index SQL inlining.
* See https://trac.osgeo.org/postgis/ticket/3675
* for sideffects of costing inlined SQL.
*/
#if POSTGIS_PGSQL_VERSION >= 120
#define _COST_DEFAULT COST 1
#define _COST_LOW COST 100
#define _COST_MEDIUM COST 1000
#define _COST_HIGH COST 10000
#else
#define _COST_DEFAULT COST 1
#define _COST_LOW COST 1
#define _COST_MEDIUM COST 10
#define _COST_HIGH COST 10
#endif
/*
* Define the build date and the version number
* (these substitiutions are done with extra quotes sinces CPP
* won't substitute within apostrophes)
*/
#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_PGSQL_VERSION 'SELECT ''@POSTGIS_PGSQL_VERSION@''::text AS version'
#ifdef POSTGIS_SVN_REVISION
#define _POSTGIS_SQL_SELECT_POSTGIS_SCRIPTS_VERSION $$ SELECT '@POSTGIS_SCRIPTS_VERSION@'::text || ' r' || POSTGIS_SVN_REVISION::text AS version $$
#else
#define _POSTGIS_SQL_SELECT_POSTGIS_SCRIPTS_VERSION $$ SELECT '@POSTGIS_SCRIPTS_VERSION@'::text AS version $$
#endif
#define SRID_USR_MAX @SRID_USR_MAX@
#endif /* _LWPGIS_DEFINES */