diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-08-10 02:36:29 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-08-10 02:36:29 +0000 |
commit | 0ee26100b64702f2fb4cd65c6dfdfb8f31e88130 (patch) | |
tree | a10c4a1937f8707bc94950216ee8fdb4f0a61fe8 /src/backend/optimizer/util/tlist.c | |
parent | e860e746e15a6c3bc26d7e337162a22e403f5a79 (diff) |
Fix UNION/INTERSECT/EXCEPT so that when two inputs being merged have
same data type and same typmod, we show that typmod as the output
typmod, rather than generic -1. This responds to several complaints
over the past few years about UNIONs unexpectedly dropping length or
precision info.
Diffstat (limited to 'src/backend/optimizer/util/tlist.c')
-rw-r--r-- | src/backend/optimizer/util/tlist.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/optimizer/util/tlist.c b/src/backend/optimizer/util/tlist.c index c75c496065c..74ebb3fc24b 100644 --- a/src/backend/optimizer/util/tlist.c +++ b/src/backend/optimizer/util/tlist.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/optimizer/util/tlist.c,v 1.72 2006/03/05 15:58:32 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/optimizer/util/tlist.c,v 1.73 2006/08/10 02:36:29 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -174,6 +174,8 @@ get_sortgrouplist_exprs(List *sortClauses, List *targetList) * * Resjunk columns are ignored if junkOK is true; otherwise presence of * a resjunk column will always cause a 'false' result. + * + * Note: currently no callers care about comparing typmods. */ bool tlist_same_datatypes(List *tlist, List *colTypes, bool junkOK) |