From 6762fe2a935c299f0d5664a51c979ae975c2ca99 Mon Sep 17 00:00:00 2001 From: wangw Date: Tue, 6 Jun 2023 11:15:35 +0800 Subject: [PATCH] tmp fix for double constraint of partition table --- src/backend/commands/ddldeparse.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/backend/commands/ddldeparse.c b/src/backend/commands/ddldeparse.c index 00cc1435b4..44b87d53a8 100644 --- a/src/backend/commands/ddldeparse.c +++ b/src/backend/commands/ddldeparse.c @@ -1323,6 +1323,10 @@ deparse_Constraints_ToJsonb(JsonbParseState *state, Oid relationId) elog(ERROR, "unrecognized constraint type"); } + /* No need to deparse constraints inherited from parent table. */ + if (OidIsValid(constrForm->conparentid)) + continue; + /* * "type" and "contype" are not part of the printable output, but are * useful to programmatically distinguish these from columns and among -- 2.31.1