vrpRouting  0.3
_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 
29 #define UNUSED(x) (void)(x)
31 
32 PGDLLEXPORT Datum _vrp_boost_version(PG_FUNCTION_ARGS);
33 PGDLLEXPORT Datum _vrp_build_type(PG_FUNCTION_ARGS);
34 PGDLLEXPORT Datum _vrp_compilation_date(PG_FUNCTION_ARGS);
35 PGDLLEXPORT Datum _vrp_compiler_version(PG_FUNCTION_ARGS);
36 PGDLLEXPORT Datum _vrp_git_hash(PG_FUNCTION_ARGS);
37 PGDLLEXPORT Datum _vrp_lib_version(PG_FUNCTION_ARGS);
38 PGDLLEXPORT Datum _vrp_operating_system(PG_FUNCTION_ARGS);
39 PGDLLEXPORT Datum _vrp_pgsql_version(PG_FUNCTION_ARGS);
40 
41 
42 
43 
45 PGDLLEXPORT Datum _vrp_boost_version(PG_FUNCTION_ARGS) {
46  UNUSED(fcinfo);
47  char *ver = BOOST_VERSION;
48  text *result = cstring_to_text(ver);
49  PG_RETURN_TEXT_P(result);
50 }
51 
53 PGDLLEXPORT Datum _vrp_build_type(PG_FUNCTION_ARGS) {
54  UNUSED(fcinfo);
55  char *ver = CMAKE_BUILD_TYPE;
56  text *result = cstring_to_text(ver);
57  PG_RETURN_TEXT_P(result);
58 }
59 
61 PGDLLEXPORT Datum _vrp_compilation_date(PG_FUNCTION_ARGS) {
62  UNUSED(fcinfo);
63  char *ver = COMPILATION_DATE;
64  text *result = cstring_to_text(ver);
65  PG_RETURN_TEXT_P(result);
66 }
67 
69 PGDLLEXPORT Datum _vrp_compiler_version(PG_FUNCTION_ARGS) {
70  UNUSED(fcinfo);
71  char *ver = COMPILER_VERSION;
72  text *result = cstring_to_text(ver);
73  PG_RETURN_TEXT_P(result);
74 }
75 
77 PGDLLEXPORT Datum _vrp_git_hash(PG_FUNCTION_ARGS) {
78  UNUSED(fcinfo);
79  char *ver = PROJECT_GIT_HASH;
80  text *result = cstring_to_text(ver);
81  PG_RETURN_TEXT_P(result);
82 }
83 
85 PGDLLEXPORT Datum _vrp_lib_version(PG_FUNCTION_ARGS) {
86  UNUSED(fcinfo);
87  char *ver = PROJECT_LIB_NAME;
88  text *result = cstring_to_text(ver);
89  PG_RETURN_TEXT_P(result);
90 }
91 
93 PGDLLEXPORT Datum _vrp_operating_system(PG_FUNCTION_ARGS) {
94  UNUSED(fcinfo);
95  char *ver = SYSTEM_NAME;
96  text *result = cstring_to_text(ver);
97  PG_RETURN_TEXT_P(result);
98 }
99 
100 
102 PGDLLEXPORT Datum _vrp_pgsql_version(PG_FUNCTION_ARGS) {
103  UNUSED(fcinfo);
104  char *ver = PostgreSQL_VERSION_STRING;
105  text *result = cstring_to_text(ver);
106  PG_RETURN_TEXT_P(result);
107 }
_vrp_pgsql_version
PGDLLEXPORT Datum _vrp_pgsql_version(PG_FUNCTION_ARGS)
Definition: _version.c:102
_vrp_compilation_date
PGDLLEXPORT Datum _vrp_compilation_date(PG_FUNCTION_ARGS)
Definition: _version.c:61
_vrp_operating_system
PGDLLEXPORT Datum _vrp_operating_system(PG_FUNCTION_ARGS)
Definition: _version.c:93
PG_FUNCTION_INFO_V1
PG_FUNCTION_INFO_V1(_vrp_boost_version)
postgres_connection.h
_vrp_build_type
PGDLLEXPORT Datum _vrp_build_type(PG_FUNCTION_ARGS)
Definition: _version.c:53
PG_MODULE_MAGIC
PG_MODULE_MAGIC
Definition: _version.c:30
_vrp_git_hash
PGDLLEXPORT Datum _vrp_git_hash(PG_FUNCTION_ARGS)
Definition: _version.c:77
UNUSED
#define UNUSED(x)
Definition: _version.c:29
_vrp_compiler_version
PGDLLEXPORT Datum _vrp_compiler_version(PG_FUNCTION_ARGS)
Definition: _version.c:69
_vrp_boost_version
PGDLLEXPORT Datum _vrp_boost_version(PG_FUNCTION_ARGS)
Definition: _version.c:45
_vrp_lib_version
PGDLLEXPORT Datum _vrp_lib_version(PG_FUNCTION_ARGS)
Definition: _version.c:85