aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-12-17 04:32:29 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-12-17 04:32:29 +0000
commitcfa4d4d040ba58cb94c44482782cfb869c58a68d (patch)
treef0abc77fc99eba8bb9809819127c8de88b53de76 /src
parent0c2629efaa4222b81309a558e66c6f9214ce7333 (diff)
downloadpostgresql-cfa4d4d040ba58cb94c44482782cfb869c58a68d.tar.gz
postgresql-cfa4d4d040ba58cb94c44482782cfb869c58a68d.zip
Tweak select_common_type() to deal with possibility of multiple preferred
types in a category --- it was taking the last preferred type among the inputs, rather than the first one as intended.
Diffstat (limited to 'src')
-rw-r--r--src/backend/parser/parse_coerce.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/parser/parse_coerce.c b/src/backend/parser/parse_coerce.c
index fe4d22fb114..97b3d239406 100644
--- a/src/backend/parser/parse_coerce.c
+++ b/src/backend/parser/parse_coerce.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.51 2000/12/15 18:02:47 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.52 2000/12/17 04:32:29 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -364,6 +364,7 @@ select_common_type(List *typeids, const char *context)
context, typeidTypeName(ptype), typeidTypeName(ntype));
}
else if (IsPreferredType(pcategory, ntype)
+ && !IsPreferredType(pcategory, ptype)
&& can_coerce_type(1, &ptype, &ntype))
{
/*