@@ -95,7 +95,7 @@ logicalrep_read_commit(StringInfo in, LogicalRepCommitData *commit_data)
95
95
uint8 flags = pq_getmsgbyte (in );
96
96
97
97
if (flags != 0 )
98
- elog (ERROR , "unknown flags %u in commit message" , flags );
98
+ elog (ERROR , "unrecognized flags %u in commit message" , flags );
99
99
100
100
/* read fields */
101
101
commit_data -> commit_lsn = pq_getmsgint64 (in );
@@ -468,7 +468,6 @@ logicalrep_read_tuple(StringInfo in, LogicalRepTupleData *tuple)
468
468
for (i = 0 ; i < natts ; i ++ )
469
469
{
470
470
char kind ;
471
- int len ;
472
471
473
472
kind = pq_getmsgbyte (in );
474
473
@@ -479,10 +478,13 @@ logicalrep_read_tuple(StringInfo in, LogicalRepTupleData *tuple)
479
478
tuple -> changed [i ] = true;
480
479
break ;
481
480
case 'u' : /* unchanged column */
482
- tuple -> values [i ] = (char * ) 0xdeadbeef ; /* make bad usage more obvious */
481
+ /* we don't receive the value of an unchanged column */
482
+ tuple -> values [i ] = NULL ;
483
483
break ;
484
484
case 't' : /* text formatted value */
485
485
{
486
+ int len ;
487
+
486
488
tuple -> changed [i ] = true;
487
489
488
490
len = pq_getmsgint (in , 4 ); /* read length */
@@ -494,7 +496,7 @@ logicalrep_read_tuple(StringInfo in, LogicalRepTupleData *tuple)
494
496
}
495
497
break ;
496
498
default :
497
- elog (ERROR , "unknown data representation type '%c'" , kind );
499
+ elog (ERROR , "unrecognized data representation type '%c'" , kind );
498
500
}
499
501
}
500
502
}
0 commit comments