PGROUTING  3.2
_version.c
Go to the documentation of this file.
1 /*PGR-GNU*****************************************************************
2 
3 File: _version.c
4 
5 Function's developer:
6 Copyright (c) 2015 Celia Virginia Vergara Castillo
8 
9 ------
10 
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2 of the License, or
14 (at your option) any later version.
15 
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
20 
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 
25  ********************************************************************PGR-GNU*/
26 
28 #include "./_version.h"
29 
30 #define UNUSED(x) (void)(x)
31 
32 PGDLLEXPORT Datum _pgr_boost_version(PG_FUNCTION_ARGS);
33 PGDLLEXPORT Datum _pgr_build_type(PG_FUNCTION_ARGS);
34 PGDLLEXPORT Datum _pgr_compilation_date(PG_FUNCTION_ARGS);
35 PGDLLEXPORT Datum _pgr_compiler_version(PG_FUNCTION_ARGS);
36 PGDLLEXPORT Datum _pgr_git_hash(PG_FUNCTION_ARGS);
37 PGDLLEXPORT Datum _pgr_lib_version(PG_FUNCTION_ARGS);
38 PGDLLEXPORT Datum _pgr_operating_system(PG_FUNCTION_ARGS);
39 PGDLLEXPORT Datum _pgr_pgsql_version(PG_FUNCTION_ARGS);
40 
41 
42 
44 PGDLLEXPORT Datum _pgr_boost_version(PG_FUNCTION_ARGS) {
45  UNUSED(fcinfo);
46  char *ver = BOOST_VERSION;
47  text *result = cstring_to_text(ver);
48  PG_RETURN_TEXT_P(result);
49 }
50 
52 PGDLLEXPORT Datum _pgr_build_type(PG_FUNCTION_ARGS) {
53  UNUSED(fcinfo);
54  char *ver = CMAKE_BUILD_TYPE;
55  text *result = cstring_to_text(ver);
56  PG_RETURN_TEXT_P(result);
57 }
58 
60 PGDLLEXPORT Datum _pgr_compilation_date(PG_FUNCTION_ARGS) {
61  UNUSED(fcinfo);
62  char *ver = COMPILATION_DATE;
63  text *result = cstring_to_text(ver);
64  PG_RETURN_TEXT_P(result);
65 }
66 
68 PGDLLEXPORT Datum _pgr_compiler_version(PG_FUNCTION_ARGS) {
69  UNUSED(fcinfo);
70  char *ver = COMPILER_VERSION;
71  text *result = cstring_to_text(ver);
72  PG_RETURN_TEXT_P(result);
73 }
74 
76 PGDLLEXPORT Datum _pgr_git_hash(PG_FUNCTION_ARGS) {
77  UNUSED(fcinfo);
78  char *ver = PROJECT_GIT_HASH;
79  text *result = cstring_to_text(ver);
80  PG_RETURN_TEXT_P(result);
81 }
82 
84 PGDLLEXPORT Datum _pgr_lib_version(PG_FUNCTION_ARGS) {
85  UNUSED(fcinfo);
86  char *ver = PROJECT_LIB_NAME;
87  text *result = cstring_to_text(ver);
88  PG_RETURN_TEXT_P(result);
89 }
90 
92 PGDLLEXPORT Datum _pgr_operating_system(PG_FUNCTION_ARGS) {
93  UNUSED(fcinfo);
94  char *ver = CMAKE_SYSTEM_NAME;
95  text *result = cstring_to_text(ver);
96  PG_RETURN_TEXT_P(result);
97 }
98 
99 
101 PGDLLEXPORT Datum _pgr_pgsql_version(PG_FUNCTION_ARGS) {
102  UNUSED(fcinfo);
103  char *ver = POSTGRES_VERSION;
104  text *result = cstring_to_text(ver);
105  PG_RETURN_TEXT_P(result);
106 }
_pgr_build_type
PGDLLEXPORT Datum _pgr_build_type(PG_FUNCTION_ARGS)
Definition: _version.c:52
COMPILER_VERSION
#define COMPILER_VERSION
Definition: _version.h:29
_pgr_lib_version
PGDLLEXPORT Datum _pgr_lib_version(PG_FUNCTION_ARGS)
Definition: _version.c:84
postgres_connection.h
PROJECT_GIT_HASH
#define PROJECT_GIT_HASH
Definition: _version.h:31
_pgr_git_hash
PGDLLEXPORT Datum _pgr_git_hash(PG_FUNCTION_ARGS)
Definition: _version.c:76
PG_FUNCTION_INFO_V1
PG_FUNCTION_INFO_V1(_pgr_boost_version)
COMPILATION_DATE
#define COMPILATION_DATE
Definition: _version.h:30
_pgr_operating_system
PGDLLEXPORT Datum _pgr_operating_system(PG_FUNCTION_ARGS)
Definition: _version.c:92
CMAKE_BUILD_TYPE
#define CMAKE_BUILD_TYPE
Definition: _version.h:28
_pgr_compilation_date
PGDLLEXPORT Datum _pgr_compilation_date(PG_FUNCTION_ARGS)
Definition: _version.c:60
CMAKE_SYSTEM_NAME
#define CMAKE_SYSTEM_NAME
Definition: _version.h:33
_pgr_pgsql_version
PGDLLEXPORT Datum _pgr_pgsql_version(PG_FUNCTION_ARGS)
Definition: _version.c:101
POSTGRES_VERSION
#define POSTGRES_VERSION
Definition: _version.h:34
_pgr_compiler_version
PGDLLEXPORT Datum _pgr_compiler_version(PG_FUNCTION_ARGS)
Definition: _version.c:68
_version.h
BOOST_VERSION
#define BOOST_VERSION
Definition: _version.h:27
UNUSED
#define UNUSED(x)
Definition: _version.c:30
_pgr_boost_version
PGDLLEXPORT Datum _pgr_boost_version(PG_FUNCTION_ARGS)
Definition: _version.c:44
PROJECT_LIB_NAME
#define PROJECT_LIB_NAME
Definition: _version.h:32