From: Peter Eisentraut Date: Fri, 12 Aug 2022 06:17:30 +0000 (+0200) Subject: Fix _outConstraint() for "identity" constraints X-Git-Tag: REL_10_23~76 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6bd18f176bd78ba3d235ec5d173288da94bbdbf1;p=thirdparty%2Fpostgresql.git Fix _outConstraint() for "identity" constraints The set of fields printed by _outConstraint() in the CONSTR_IDENTITY case didn't match the set of fields actually used in that case. (The code was probably uncarefully copied from the CONSTR_DEFAULT case.) Fix that by using the right set of fields. Since there is no read support for this node type, this is really just for debugging output right now, so it doesn't affect anything important. --- diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c index 0c0b4f64fb4..71a3acf2d76 100644 --- a/src/backend/nodes/outfuncs.c +++ b/src/backend/nodes/outfuncs.c @@ -3469,8 +3469,7 @@ _outConstraint(StringInfo str, const Constraint *node) case CONSTR_IDENTITY: appendStringInfoString(str, "IDENTITY"); - WRITE_NODE_FIELD(raw_expr); - WRITE_STRING_FIELD(cooked_expr); + WRITE_NODE_FIELD(options); WRITE_CHAR_FIELD(generated_when); break;