8000 fix errorcode check pglogical utility stmt apply · postgrespro/postgres_cluster@0e22c9b · GitHub
[go: up one dir, main page]

Skip to content

Commit 0e22c9b

Browse files
committed
fix errorcode check pglogical utility stmt apply
1 parent 92ac6ea commit 0e22c9b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

contrib/mmts/pglogical_apply.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -701,9 +701,8 @@ process_remote_insert(StringInfo s, Relation rel)
701701
MTM_LOG3("%d: Execute utility statement %s", MyProcPid, ddl);
702702
rc = SPI_execute(ddl, false, 0);
703703
SPI_finish();
704-
if (rc != SPI_OK_UTILITY) {
704+
if (rc < 0)
705705
elog(ERROR, "Failed to execute utility statement %s", ddl);
706-
}
707706
} else if (strcmp(relname, MULTIMASTER_LOCAL_TABLES_TABLE) == 0) {
708707
char* schema = TextDatumGetCString(new_tuple.values[Anum_mtm_local_tables_rel_schema-1]);
709708
char* name = TextDatumGetCString(new_tuple.values[Anum_mtm_local_tables_rel_name-1]);

0 commit comments

Comments
 (0)
0