PostGIS  3.0.6dev-r@@SVN_REVISION@@
postgis_libprotobuf.c
Go to the documentation of this file.
1 #include "postgres.h"
2 #include "utils/builtins.h"
3 #include "../postgis_config.h"
4 #include "lwgeom_pg.h"
5 
6 #ifdef HAVE_LIBPROTOBUF
7 #include <protobuf-c/protobuf-c.h>
8 #endif
9 
10 #ifdef HAVE_WAGYU
11 #include "lwgeom_wagyu.h"
12 #endif
13 
15 Datum postgis_libprotobuf_version(PG_FUNCTION_ARGS)
16 {
17 #ifdef HAVE_PROTOBUF_C_VERSION
18  const char *ver = protobuf_c_version();
19  text *result = cstring_to_text(ver);
20  PG_RETURN_POINTER(result);
21 #else
22  PG_RETURN_NULL();
23 #endif
24 }
25 
27 Datum postgis_wagyu_version(PG_FUNCTION_ARGS)
28 {
29 #ifndef HAVE_WAGYU
30  PG_RETURN_NULL();
31 #else /* HAVE_WAGYU */
32  const char *ver = libwagyu_version();
33  text *result = cstring_to_text(ver);
34  PG_RETURN_POINTER(result);
35 #endif
36 }
Datum postgis_wagyu_version(PG_FUNCTION_ARGS)
Datum postgis_libprotobuf_version(PG_FUNCTION_ARGS)
PG_FUNCTION_INFO_V1(postgis_libprotobuf_version)