mirror of
https://github.com/postgres/postgres.git
synced 2025-11-04 20:11:56 +03:00
Use PqMsg_* macros in more places.
Commit f4b54e1ed9, which introduced macros for protocol characters,
missed updating a few places. It also did not introduce macros for
messages sent from parallel workers to their leader processes.
This commit adds a new section in protocol.h for those.
Author: Aleksander Alekseev
Discussion: https://postgr.es/m/CAJ7c6TNTd09AZq8tGaHS3LDyH_CCnpv0oOz2wN1dGe8zekxrdQ%40mail.gmail.com
Backpatch-through: 17
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
|
||||
#include "access/printtup.h"
|
||||
#include "libpq/pqformat.h"
|
||||
#include "libpq/protocol.h"
|
||||
#include "tcop/pquery.h"
|
||||
#include "utils/lsyscache.h"
|
||||
#include "utils/memdebug.h"
|
||||
@@ -170,7 +171,7 @@ SendRowDescriptionMessage(StringInfo buf, TupleDesc typeinfo,
|
||||
ListCell *tlist_item = list_head(targetlist);
|
||||
|
||||
/* tuple descriptor message type */
|
||||
pq_beginmessage_reuse(buf, 'T');
|
||||
pq_beginmessage_reuse(buf, PqMsg_RowDescription);
|
||||
/* # of attrs in tuples */
|
||||
pq_sendint16(buf, natts);
|
||||
|
||||
@@ -322,7 +323,7 @@ printtup(TupleTableSlot *slot, DestReceiver *self)
|
||||
/*
|
||||
* Prepare a DataRow message (note buffer is in per-query context)
|
||||
*/
|
||||
pq_beginmessage_reuse(buf, 'D');
|
||||
pq_beginmessage_reuse(buf, PqMsg_DataRow);
|
||||
|
||||
pq_sendint16(buf, natts);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user