diff options
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r-- | src/backend/commands/tablecmds.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 596cd864017..d7573b8ef50 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -4337,10 +4337,12 @@ ATExecAddColumn(AlteredTableInfo *tab, Relation rel, { Oid baseTypeId; int32 baseTypeMod; + Oid baseTypeColl; baseTypeMod = typmod; baseTypeId = getBaseTypeAndTypmod(typeOid, &baseTypeMod); - defval = (Expr *) makeNullConst(baseTypeId, baseTypeMod); + baseTypeColl = get_typcollation(baseTypeId); + defval = (Expr *) makeNullConst(baseTypeId, baseTypeMod, baseTypeColl); defval = (Expr *) coerce_to_target_type(NULL, (Node *) defval, baseTypeId, |