From 31079a4a8e66e56e48bad94d380fa6224e9ffa0d Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Wed, 11 Oct 2017 21:00:46 -0700 Subject: 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 --- src/backend/utils/adt/arrayfuncs.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/backend/utils/adt/arrayfuncs.c') diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c index ca04b13e825..b4c31ef65c2 100644 --- a/src/backend/utils/adt/arrayfuncs.c +++ b/src/backend/utils/adt/arrayfuncs.c @@ -1590,13 +1590,13 @@ array_send(PG_FUNCTION_ARGS) pq_begintypsend(&buf); /* Send the array header information */ - pq_sendint(&buf, ndim, 4); - pq_sendint(&buf, AARR_HASNULL(v) ? 1 : 0, 4); - pq_sendint(&buf, element_type, sizeof(Oid)); + pq_sendint32(&buf, ndim); + pq_sendint32(&buf, AARR_HASNULL(v) ? 1 : 0); + pq_sendint32(&buf, element_type); for (i = 0; i < ndim; i++) { - pq_sendint(&buf, dim[i], 4); - pq_sendint(&buf, lb[i], 4); + pq_sendint32(&buf, dim[i]); + pq_sendint32(&buf, lb[i]); } /* Send the array elements using the element's own sendproc */ @@ -1614,14 +1614,14 @@ array_send(PG_FUNCTION_ARGS) if (isnull) { /* -1 length means a NULL */ - pq_sendint(&buf, -1, 4); + pq_sendint32(&buf, -1); } else { bytea *outputbytes; outputbytes = SendFunctionCall(&my_extra->proc, itemvalue); - pq_sendint(&buf, VARSIZE(outputbytes) - VARHDRSZ, 4); + pq_sendint32(&buf, VARSIZE(outputbytes) - VARHDRSZ); pq_sendbytes(&buf, VARDATA(outputbytes), VARSIZE(outputbytes) - VARHDRSZ); pfree(outputbytes); -- cgit v1.2.3