|
|
|
@ -5190,13 +5190,12 @@ numeric_avg_deserialize(PG_FUNCTION_ARGS) |
|
|
|
|
init_var(&tmp_var); |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Fake up a StringInfo pointing to the bytea's value so we can "receive" |
|
|
|
|
* the serialized aggregate state value. |
|
|
|
|
* Copy the bytea into a StringInfo so that we can "receive" it using the |
|
|
|
|
* standard recv-function infrastructure. |
|
|
|
|
*/ |
|
|
|
|
buf.data = VARDATA_ANY(sstate); |
|
|
|
|
buf.len = VARSIZE_ANY_EXHDR(sstate); |
|
|
|
|
buf.maxlen = 0; |
|
|
|
|
buf.cursor = 0; |
|
|
|
|
initStringInfo(&buf); |
|
|
|
|
appendBinaryStringInfo(&buf, |
|
|
|
|
VARDATA_ANY(sstate), VARSIZE_ANY_EXHDR(sstate)); |
|
|
|
|
|
|
|
|
|
result = makeNumericAggStateCurrentContext(false); |
|
|
|
|
|
|
|
|
@ -5223,6 +5222,7 @@ numeric_avg_deserialize(PG_FUNCTION_ARGS) |
|
|
|
|
result->nInfcount = pq_getmsgint64(&buf); |
|
|
|
|
|
|
|
|
|
pq_getmsgend(&buf); |
|
|
|
|
pfree(buf.data); |
|
|
|
|
|
|
|
|
|
free_var(&tmp_var); |
|
|
|
|
|
|
|
|
@ -5306,13 +5306,12 @@ numeric_deserialize(PG_FUNCTION_ARGS) |
|
|
|
|
init_var(&tmp_var); |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Fake up a StringInfo pointing to the bytea's value so we can "receive" |
|
|
|
|
* the serialized aggregate state value. |
|
|
|
|
* Copy the bytea into a StringInfo so that we can "receive" it using the |
|
|
|
|
* standard recv-function infrastructure. |
|
|
|
|
*/ |
|
|
|
|
buf.data = VARDATA_ANY(sstate); |
|
|
|
|
buf.len = VARSIZE_ANY_EXHDR(sstate); |
|
|
|
|
buf.maxlen = 0; |
|
|
|
|
buf.cursor = 0; |
|
|
|
|
initStringInfo(&buf); |
|
|
|
|
appendBinaryStringInfo(&buf, |
|
|
|
|
VARDATA_ANY(sstate), VARSIZE_ANY_EXHDR(sstate)); |
|
|
|
|
|
|
|
|
|
result = makeNumericAggStateCurrentContext(false); |
|
|
|
|
|
|
|
|
@ -5343,6 +5342,7 @@ numeric_deserialize(PG_FUNCTION_ARGS) |
|
|
|
|
result->nInfcount = pq_getmsgint64(&buf); |
|
|
|
|
|
|
|
|
|
pq_getmsgend(&buf); |
|
|
|
|
pfree(buf.data); |
|
|
|
|
|
|
|
|
|
free_var(&tmp_var); |
|
|
|
|
|
|
|
|
@ -5677,13 +5677,12 @@ numeric_poly_deserialize(PG_FUNCTION_ARGS) |
|
|
|
|
init_var(&tmp_var); |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Fake up a StringInfo pointing to the bytea's value so we can "receive" |
|
|
|
|
* the serialized aggregate state value. |
|
|
|
|
* Copy the bytea into a StringInfo so that we can "receive" it using the |
|
|
|
|
* standard recv-function infrastructure. |
|
|
|
|
*/ |
|
|
|
|
buf.data = VARDATA_ANY(sstate); |
|
|
|
|
buf.len = VARSIZE_ANY_EXHDR(sstate); |
|
|
|
|
buf.maxlen = 0; |
|
|
|
|
buf.cursor = 0; |
|
|
|
|
initStringInfo(&buf); |
|
|
|
|
appendBinaryStringInfo(&buf, |
|
|
|
|
VARDATA_ANY(sstate), VARSIZE_ANY_EXHDR(sstate)); |
|
|
|
|
|
|
|
|
|
result = makePolyNumAggStateCurrentContext(false); |
|
|
|
|
|
|
|
|
@ -5707,6 +5706,7 @@ numeric_poly_deserialize(PG_FUNCTION_ARGS) |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
pq_getmsgend(&buf); |
|
|
|
|
pfree(buf.data); |
|
|
|
|
|
|
|
|
|
free_var(&tmp_var); |
|
|
|
|
|
|
|
|
@ -5868,13 +5868,12 @@ int8_avg_deserialize(PG_FUNCTION_ARGS) |
|
|
|
|
init_var(&tmp_var); |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Fake up a StringInfo pointing to the bytea's value so we can "receive" |
|
|
|
|
* the serialized aggregate state value. |
|
|
|
|
* Copy the bytea into a StringInfo so that we can "receive" it using the |
|
|
|
|
* standard recv-function infrastructure. |
|
|
|
|
*/ |
|
|
|
|
buf.data = VARDATA_ANY(sstate); |
|
|
|
|
buf.len = VARSIZE_ANY_EXHDR(sstate); |
|
|
|
|
buf.maxlen = 0; |
|
|
|
|
buf.cursor = 0; |
|
|
|
|
initStringInfo(&buf); |
|
|
|
|
appendBinaryStringInfo(&buf, |
|
|
|
|
VARDATA_ANY(sstate), VARSIZE_ANY_EXHDR(sstate)); |
|
|
|
|
|
|
|
|
|
result = makePolyNumAggStateCurrentContext(false); |
|
|
|
|
|
|
|
|
@ -5890,6 +5889,7 @@ int8_avg_deserialize(PG_FUNCTION_ARGS) |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
pq_getmsgend(&buf); |
|
|
|
|
pfree(buf.data); |
|
|
|
|
|
|
|
|
|
free_var(&tmp_var); |
|
|
|
|
|
|
|
|
|