diff --git a/pgsql/pc_access.c b/pgsql/pc_access.c index 3b29201..3ddee8c 100644 --- a/pgsql/pc_access.c +++ b/pgsql/pc_access.c @@ -138,7 +138,11 @@ array_get_isnull(const bits8 *nullbitmap, int offset) } static PCPATCH * +#if PGSQL_VERSION < 120 pcpatch_from_point_array(ArrayType *array, FunctionCallInfoData *fcinfo) +#else +pcpatch_from_point_array(ArrayType *array, FunctionCallInfo fcinfo) +#endif { int nelems; bits8 *bitmap; @@ -209,7 +213,11 @@ pcpatch_from_point_array(ArrayType *array, FunctionCallInfoData *fcinfo) static PCPATCH * +#if PGSQL_VERSION < 120 pcpatch_from_patch_array(ArrayType *array, FunctionCallInfoData *fcinfo) +#else +pcpatch_from_patch_array(ArrayType *array, FunctionCallInfo fcinfo) +#endif { int nelems; bits8 *bitmap; diff --git a/pgsql/pc_pgsql.c b/pgsql/pc_pgsql.c index 4623bf6..704b604 100644 --- a/pgsql/pc_pgsql.c +++ b/pgsql/pc_pgsql.c @@ -143,7 +143,11 @@ uint32 pcid_from_typmod(const int32 typmod) */ PCPOINT * +#if PGSQL_VERSION < 120 pc_point_from_hexwkb(const char *hexwkb, size_t hexlen, FunctionCallInfoData *fcinfo) +#else +pc_point_from_hexwkb(const char *hexwkb, size_t hexlen, FunctionCallInfo fcinfo) +#endif { PCPOINT *pt; PCSCHEMA *schema; @@ -176,7 +180,11 @@ pc_point_to_hexwkb(const PCPOINT *pt) */ PCPATCH * +#if PGSQL_VERSION < 120 pc_patch_from_hexwkb(const char *hexwkb, size_t hexlen, FunctionCallInfoData *fcinfo) +#else +pc_patch_from_hexwkb(const char *hexwkb, size_t hexlen, FunctionCallInfo fcinfo) +#endif { PCPATCH *patch; PCSCHEMA *schema; @@ -321,7 +329,11 @@ typedef struct * return it. */ static SchemaCache * +#if PGSQL_VERSION < 120 GetSchemaCache(FunctionCallInfoData* fcinfo) +#else +GetSchemaCache(FunctionCallInfo fcinfo) +#endif { SchemaCache *cache = fcinfo->flinfo->fn_extra; if ( ! cache ) @@ -335,7 +347,11 @@ GetSchemaCache(FunctionCallInfoData* fcinfo) PCSCHEMA * +#if PGSQL_VERSION < 120 pc_schema_from_pcid(uint32 pcid, FunctionCallInfoData *fcinfo) +#else +pc_schema_from_pcid(uint32 pcid, FunctionCallInfo fcinfo) +#endif { SchemaCache *schema_cache = GetSchemaCache(fcinfo); int i; diff --git a/pgsql/pc_pgsql.h b/pgsql/pc_pgsql.h index c4f323d..e714b1e 100644 --- a/pgsql/pc_pgsql.h +++ b/pgsql/pc_pgsql.h @@ -78,7 +78,11 @@ SERIALIZED_PATCH; uint32 pcid_from_typmod(const int32 typmod); /** Look-up the PCID in the POINTCLOUD_FORMATS table, and construct a PC_SCHEMA from the XML therein */ +#if PGSQL_VERSION < 120 PCSCHEMA* pc_schema_from_pcid(uint32_t pcid, FunctionCallInfoData *fcinfo); +#else +PCSCHEMA* pc_schema_from_pcid(uint32_t pcid, FunctionCallInfo fcinfo); +#endif /** Look-up the PCID in the POINTCLOUD_FORMATS table, and construct a PC_SCHEMA from the XML therein */ PCSCHEMA* pc_schema_from_pcid_uncached(uint32 pcid); @@ -90,8 +94,11 @@ SERIALIZED_POINT* pc_point_serialize(const PCPOINT *pcpt); PCPOINT* pc_point_deserialize(const SERIALIZED_POINT *serpt, const PCSCHEMA *schema); /** Create a new readwrite PCPOINT from a hex string */ +#if PGSQL_VERSION < 120 PCPOINT* pc_point_from_hexwkb(const char *hexwkb, size_t hexlen, FunctionCallInfoData *fcinfo); - +#else +PCPOINT* pc_point_from_hexwkb(const char *hexwkb, size_t hexlen, FunctionCallInfo fcinfo); +#endif /** Create a hex representation of a PCPOINT */ char* pc_point_to_hexwkb(const PCPOINT *pt); @@ -108,7 +115,11 @@ SERIALIZED_PATCH* pc_patch_serialize_to_uncompressed(const PCPATCH *patch); PCPATCH* pc_patch_deserialize(const SERIALIZED_PATCH *serpatch, const PCSCHEMA *schema); /** Create a new readwrite PCPATCH from a hex string */ +#if PGSQL_VERSION < 120 PCPATCH* pc_patch_from_hexwkb(const char *hexwkb, size_t hexlen, FunctionCallInfoData *fcinfo); +#else +PCPATCH* pc_patch_from_hexwkb(const char *hexwkb, size_t hexlen, FunctionCallInfo fcinfo); +#endif /** Create a hex representation of a PCPOINT */ char* pc_patch_to_hexwkb(const PCPATCH *patch);