diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2011-04-22 17:43:18 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2011-04-22 17:43:18 -0400 |
commit | 9e9b9ac7d1860fbb98eb4db17a94ff25524b6447 (patch) | |
tree | b8505f0c0aa817e1611f43d130248fa7bbb2103c /src/backend/parser/parse_target.c | |
parent | 0cfdc1c657b7c2aa1e4524f495e84005f750ec02 (diff) | |
download | postgresql-9e9b9ac7d1860fbb98eb4db17a94ff25524b6447.tar.gz postgresql-9e9b9ac7d1860fbb98eb4db17a94ff25524b6447.zip |
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().
Diffstat (limited to 'src/backend/parser/parse_target.c')
-rw-r--r-- | src/backend/parser/parse_target.c | 13 |
1 files changed, 7 insertions, 6 deletions
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)) { |