aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-11-26 16:46:51 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-11-26 16:46:51 +0000
commit07daff63c55b2d33545d794b6058423dc846529d (patch)
treedc80acd1653e18d53947891f75c70beedb61f30b /src/backend/utils
parent3f398e4a27d0a7e7a4d230555728efe39c965591 (diff)
downloadpostgresql-07daff63c55b2d33545d794b6058423dc846529d.tar.gz
postgresql-07daff63c55b2d33545d794b6058423dc846529d.zip
Fix select_common_type() so that it can select a domain type, if all inputs
to a UNION, CASE, or related construct are of the same domain type. The main part of this routine smashes domains to their base types, which seems necessary because the logic involves TypeCategory() and IsPreferredType(), neither of which work usefully on domains. However, we can add a first pass that just detects whether all the inputs are exactly the same type, and if so accept that without question (so long as it's not UNKNOWN). Per recent gripe from Dean Rasheed. In passing, remove some tests for InvalidOid, which have clearly been dead code for quite some time now, because getBaseType() would fail on that input. Also, clarify the manual's not-very-precise description of the existing algorithm's behavior.
Diffstat (limited to 'src/backend/utils')
0 files changed, 0 insertions, 0 deletions