postgres.git / summary / log / commit / refs

commit    3f4069ca2c3efdc5d945fb7a4a5b4a1ecd176719
Author:   Peter Eisentraut <peter@eisentraut.org>
Date:     Fri Aug 12 06:17:30 2022 +0000

    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.


src/backend/nodes/outfuncs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c index 0df9be16082..d746d6fee87 100644 --- a/src/backend/nodes/outfuncs.c +++ b/src/backend/nodes/outfuncs.c @@ -3672,8 +3672,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; [parent: e082ef9c4282]