Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf3a8f73

Browse files
author
Amit Kapila
committed
Use Enums for logical replication message types at more places.
Commit644f0d7 added logical replication message type enums to useinstead of character literals but some char substitutions were overlooked.Author: Peter SmithReviewed-by: Amit KapilaDiscussion:https://postgr.es/m/CAHut+PsTG=Vrv8hgrvOnAvCNR21jhqMdPk2n0a1uJPoW0p+UfQ@mail.gmail.com
1 parentc98763b commitf3a8f73

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

‎src/backend/replication/logical/worker.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ ensure_transaction(void)
304304
* Returns true for streamed transactions, false otherwise (regular mode).
305305
*/
306306
staticbool
307-
handle_streamed_transaction(constcharaction,StringInfos)
307+
handle_streamed_transaction(LogicalRepMsgTypeaction,StringInfos)
308308
{
309309
TransactionIdxid;
310310

@@ -1090,7 +1090,7 @@ apply_handle_relation(StringInfo s)
10901090
{
10911091
LogicalRepRelation*rel;
10921092

1093-
if (handle_streamed_transaction('R',s))
1093+
if (handle_streamed_transaction(LOGICAL_REP_MSG_RELATION,s))
10941094
return;
10951095

10961096
rel=logicalrep_read_rel(s);
@@ -1108,7 +1108,7 @@ apply_handle_type(StringInfo s)
11081108
{
11091109
LogicalRepTyptyp;
11101110

1111-
if (handle_streamed_transaction('Y',s))
1111+
if (handle_streamed_transaction(LOGICAL_REP_MSG_TYPE,s))
11121112
return;
11131113

11141114
logicalrep_read_typ(s,&typ);
@@ -1148,7 +1148,7 @@ apply_handle_insert(StringInfo s)
11481148
TupleTableSlot*remoteslot;
11491149
MemoryContextoldctx;
11501150

1151-
if (handle_streamed_transaction('I',s))
1151+
if (handle_streamed_transaction(LOGICAL_REP_MSG_INSERT,s))
11521152
return;
11531153

11541154
ensure_transaction();
@@ -1269,7 +1269,7 @@ apply_handle_update(StringInfo s)
12691269
RangeTblEntry*target_rte;
12701270
MemoryContextoldctx;
12711271

1272-
if (handle_streamed_transaction('U',s))
1272+
if (handle_streamed_transaction(LOGICAL_REP_MSG_UPDATE,s))
12731273
return;
12741274

12751275
ensure_transaction();
@@ -1426,7 +1426,7 @@ apply_handle_delete(StringInfo s)
14261426
TupleTableSlot*remoteslot;
14271427
MemoryContextoldctx;
14281428

1429-
if (handle_streamed_transaction('D',s))
1429+
if (handle_streamed_transaction(LOGICAL_REP_MSG_DELETE,s))
14301430
return;
14311431

14321432
ensure_transaction();
@@ -1795,7 +1795,7 @@ apply_handle_truncate(StringInfo s)
17951795
List*relids_logged=NIL;
17961796
ListCell*lc;
17971797

1798-
if (handle_streamed_transaction('T',s))
1798+
if (handle_streamed_transaction(LOGICAL_REP_MSG_TRUNCATE,s))
17991799
return;
18001800

18011801
ensure_transaction();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp