Fix PG 9.5 compatibility.

This commit is contained in:
Vincent Picavet 2015-07-30 16:45:51 +02:00 committed by Sandro Santilli
parent 3612254615
commit a94e4c045d
2 changed files with 2 additions and 9 deletions

1
NEWS
View File

@ -10,6 +10,7 @@
- Enhancements
- Support sigbits encoding for 64bit integers (#61)
- Warn about truncated values (#68)
- Compatibility with PostgreSQL 9.5 (#90)
1.0.0
-----

View File

@ -353,15 +353,7 @@ Datum pointcloud_agg_transfn(PG_FUNCTION_ARGS)
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("could not determine input data type")));
if (fcinfo->context && IsA(fcinfo->context, AggState))
{
aggcontext = ((AggState *) fcinfo->context)->aggcontext;
}
else if (fcinfo->context && IsA(fcinfo->context, WindowAggState))
{
aggcontext = ((WindowAggState *) fcinfo->context)->aggcontext;
}
else
if ( ! AggCheckCallContext(fcinfo, &aggcontext) )
{
/* cannot be called directly because of dummy-type argument */
elog(ERROR, "pointcloud_agg_transfn called in non-aggregate context");