1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Avoid an unnecessary syscache lookup in parse_coerce.c.

All the other fields of the constant are being extracted from the syscache
entry we already have, so handle collation similarly.  (There don't seem
to be any other uses for the new function at the moment.)
This commit is contained in:
Tom Lane
2011-04-08 16:11:04 -04:00
parent cba9cd4192
commit c5ff3ff492
3 changed files with 15 additions and 4 deletions

View File

@ -219,7 +219,7 @@ coerce_type(ParseState *pstate, Node *node,
newcon->consttype = baseTypeId;
newcon->consttypmod = inputTypeMod;
newcon->constcollid = get_typcollation(newcon->consttype);
newcon->constcollid = typeTypeCollation(targetType);
newcon->constlen = typeLen(targetType);
newcon->constbyval = typeByVal(targetType);
newcon->constisnull = con->constisnull;