PostGIS  2.4.9dev-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 
11 Datum postgis_libprotobuf_version(PG_FUNCTION_ARGS)
12 {
13 #ifndef HAVE_PROTOBUF_C_VERSION
14  PG_RETURN_NULL();
15 #else /* HAVE_PROTOBUF_C_VERSION */
16  const char *ver = protobuf_c_version();
17  text *result = cstring2text(ver);
18  PG_RETURN_POINTER(result);
19 #endif
20 }
PG_FUNCTION_INFO_V1(postgis_libprotobuf_version)
Datum postgis_libprotobuf_version(PG_FUNCTION_ARGS)