PostGIS
3.4.0dev-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
#include "lwgeom_wagyu.h"
9
#endif
10
11
PG_FUNCTION_INFO_V1
(
postgis_libprotobuf_version
);
12
Datum
postgis_libprotobuf_version
(PG_FUNCTION_ARGS)
13
{
14
#ifdef HAVE_LIBPROTOBUF
15
const
char
*ver = protobuf_c_version();
16
text *
result
= cstring_to_text(ver);
17
PG_RETURN_POINTER(
result
);
18
#else
19
PG_RETURN_NULL();
20
#endif
21
}
22
23
PG_FUNCTION_INFO_V1
(
postgis_wagyu_version
);
24
Datum
postgis_wagyu_version
(PG_FUNCTION_ARGS)
25
{
26
#ifndef HAVE_LIBPROTOBUF
27
PG_RETURN_NULL();
28
#else
/* HAVE_LIBPROTOBUF */
29
const
char
*ver = libwagyu_version();
30
text *
result
= cstring_to_text(ver);
31
PG_RETURN_POINTER(
result
);
32
#endif
33
}
result
char result[OUT_DOUBLE_BUFFER_SIZE]
Definition:
cu_print.c:262
postgis_wagyu_version
Datum postgis_wagyu_version(PG_FUNCTION_ARGS)
Definition:
postgis_libprotobuf.c:24
postgis_libprotobuf_version
Datum postgis_libprotobuf_version(PG_FUNCTION_ARGS)
Definition:
postgis_libprotobuf.c:12
PG_FUNCTION_INFO_V1
PG_FUNCTION_INFO_V1(postgis_libprotobuf_version)
postgis
postgis_libprotobuf.c
Generated by
1.9.1