mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +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:
@ -2100,7 +2100,7 @@ NotifyMyFrontEnd(const char *channel, const char *payload, int32 srcPid)
|
||||
StringInfoData buf;
|
||||
|
||||
pq_beginmessage(&buf, 'A');
|
||||
pq_sendint(&buf, srcPid, sizeof(int32));
|
||||
pq_sendint32(&buf, srcPid);
|
||||
pq_sendstring(&buf, channel);
|
||||
if (PG_PROTOCOL_MAJOR(FrontendProtocol) >= 3)
|
||||
pq_sendstring(&buf, payload);
|
||||
|
@ -357,9 +357,9 @@ SendCopyBegin(CopyState cstate)
|
||||
|
||||
pq_beginmessage(&buf, 'H');
|
||||
pq_sendbyte(&buf, format); /* overall format */
|
||||
pq_sendint(&buf, natts, 2);
|
||||
pq_sendint16(&buf, natts);
|
||||
for (i = 0; i < natts; i++)
|
||||
pq_sendint(&buf, format, 2); /* per-column formats */
|
||||
pq_sendint16(&buf, format); /* per-column formats */
|
||||
pq_endmessage(&buf);
|
||||
cstate->copy_dest = COPY_NEW_FE;
|
||||
}
|
||||
@ -390,9 +390,9 @@ ReceiveCopyBegin(CopyState cstate)
|
||||
|
||||
pq_beginmessage(&buf, 'G');
|
||||
pq_sendbyte(&buf, format); /* overall format */
|
||||
pq_sendint(&buf, natts, 2);
|
||||
pq_sendint16(&buf, natts);
|
||||
for (i = 0; i < natts; i++)
|
||||
pq_sendint(&buf, format, 2); /* per-column formats */
|
||||
pq_sendint16(&buf, format); /* per-column formats */
|
||||
pq_endmessage(&buf);
|
||||
cstate->copy_dest = COPY_NEW_FE;
|
||||
cstate->fe_msgbuf = makeStringInfo();
|
||||
|
Reference in New Issue
Block a user