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

Commitb23bb5e

Browse files
committed
Fix handling of dropped attributes in pglogical_apply
1 parentb76df8e commitb23bb5e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

‎contrib/mmts/pglogical_apply.c‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,18 +413,24 @@ read_tuple_parts(StringInfo s, Relation rel, TupleData *tup)
413413

414414
rnatts=pq_getmsgint(s,2);
415415

416-
if (desc->natts!=rnatts)
416+
if (desc->natts<rnatts)
417417
elog(ERROR,"tuple natts mismatch, %u vs %u",desc->natts,rnatts);
418418

419419
/* FIXME: unaligned data accesses */
420420

421421
for (i=0;i<desc->natts;i++)
422422
{
423423
Form_pg_attributeatt=desc->attrs[i];
424-
charkind=pq_getmsgbyte(s);
424+
charkind;
425425
constchar*data;
426426
intlen;
427427

428+
if (att->atttypid==InvalidOid) {
429+
continue;
430+
}
431+
432+
kind=pq_getmsgbyte(s);
433+
428434
switch (kind)
429435
{
430436
case'n':/* null */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp