From 9e9b9ac7d1860fbb98eb4db17a94ff25524b6447 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 22 Apr 2011 17:43:18 -0400 Subject: Make a code-cleanup pass over the collations patch. This patch is almost entirely cosmetic --- mostly cleaning up a lot of neglected comments, and fixing code layout problems in places where the patch made lines too long and then pgindent did weird things with that. I did find a bug-of-omission in equalTupleDescs(). --- src/backend/parser/parse_target.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/backend/parser/parse_target.c') diff --git a/src/backend/parser/parse_target.c b/src/backend/parser/parse_target.c index 3f630147b0f..e6f9e36bbca 100644 --- a/src/backend/parser/parse_target.c +++ b/src/backend/parser/parse_target.c @@ -372,7 +372,7 @@ transformAssignedExpr(ParseState *pstate, Oid type_id; /* type of value provided */ Oid attrtype; /* type of target column */ int32 attrtypmod; - Oid attrcollation; + Oid attrcollation; /* collation of target column */ Relation rd = pstate->p_target_relation; Assert(rd != NULL); @@ -388,11 +388,12 @@ transformAssignedExpr(ParseState *pstate, /* * If the expression is a DEFAULT placeholder, insert the attribute's - * type/typmod into it so that exprType will report the right things. (We - * expect that the eventually substituted default expression will in fact - * have this type and typmod.) Also, reject trying to update a subfield - * or array element with DEFAULT, since there can't be any default for - * portions of a column. + * type/typmod/collation into it so that exprType etc will report the + * right things. (We expect that the eventually substituted default + * expression will in fact have this type and typmod. The collation + * likely doesn't matter, but let's set it correctly anyway.) Also, + * reject trying to update a subfield or array element with DEFAULT, since + * there can't be any default for portions of a column. */ if (expr && IsA(expr, SetToDefault)) { -- cgit v1.2.3