mirror of
https://github.com/postgres/postgres.git
synced 2025-06-27 23:21:58 +03:00
Replace remaining uses of pq_sendint with pq_sendint{8,16,32}.
pq_sendint() remains, so extension code doesn't unnecessarily break. Author: Andres Freund Discussion: https://postgr.es/m/20170914063418.sckdzgjfrsbekae4@alap3.anarazel.de
This commit is contained in:
@ -876,12 +876,12 @@ numeric_send(PG_FUNCTION_ARGS)
|
||||
|
||||
pq_begintypsend(&buf);
|
||||
|
||||
pq_sendint(&buf, x.ndigits, sizeof(int16));
|
||||
pq_sendint(&buf, x.weight, sizeof(int16));
|
||||
pq_sendint(&buf, x.sign, sizeof(int16));
|
||||
pq_sendint(&buf, x.dscale, sizeof(int16));
|
||||
pq_sendint16(&buf, x.ndigits);
|
||||
pq_sendint16(&buf, x.weight);
|
||||
pq_sendint16(&buf, x.sign);
|
||||
pq_sendint16(&buf, x.dscale);
|
||||
for (i = 0; i < x.ndigits; i++)
|
||||
pq_sendint(&buf, x.digits[i], sizeof(NumericDigit));
|
||||
pq_sendint16(&buf, x.digits[i]);
|
||||
|
||||
PG_RETURN_BYTEA_P(pq_endtypsend(&buf));
|
||||
}
|
||||
@ -3693,7 +3693,7 @@ numeric_avg_serialize(PG_FUNCTION_ARGS)
|
||||
pq_sendbytes(&buf, VARDATA_ANY(sumX), VARSIZE_ANY_EXHDR(sumX));
|
||||
|
||||
/* maxScale */
|
||||
pq_sendint(&buf, state->maxScale, 4);
|
||||
pq_sendint32(&buf, state->maxScale);
|
||||
|
||||
/* maxScaleCount */
|
||||
pq_sendint64(&buf, state->maxScaleCount);
|
||||
@ -3815,7 +3815,7 @@ numeric_serialize(PG_FUNCTION_ARGS)
|
||||
pq_sendbytes(&buf, VARDATA_ANY(sumX2), VARSIZE_ANY_EXHDR(sumX2));
|
||||
|
||||
/* maxScale */
|
||||
pq_sendint(&buf, state->maxScale, 4);
|
||||
pq_sendint32(&buf, state->maxScale);
|
||||
|
||||
/* maxScaleCount */
|
||||
pq_sendint64(&buf, state->maxScaleCount);
|
||||
|
Reference in New Issue
Block a user