diff options
Diffstat (limited to 'src/backend/parser/parse_utilcmd.c')
-rw-r--r-- | src/backend/parser/parse_utilcmd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c index 2554ece7e3..0f7f2e8567 100644 --- a/src/backend/parser/parse_utilcmd.c +++ b/src/backend/parser/parse_utilcmd.c @@ -644,7 +644,7 @@ transformInhRelation(ParseState *pstate, CreateStmtContext *cxt, */ if (attribute->atthasdef && including_defaults) { - char *this_default = NULL; + Node *this_default = NULL; AttrDefault *attrdef; int i; @@ -655,7 +655,7 @@ transformInhRelation(ParseState *pstate, CreateStmtContext *cxt, { if (attrdef[i].adnum == parent_attno) { - this_default = attrdef[i].adbin; + this_default = stringToNode(attrdef[i].adbin); break; } } @@ -666,7 +666,7 @@ transformInhRelation(ParseState *pstate, CreateStmtContext *cxt, * but it can't; so default is ready to apply to child. */ - def->cooked_default = pstrdup(this_default); + def->cooked_default = this_default; } } |