Re: Inaccurate description of UNION/CASE/etc type selection
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: "David G. Johnston" <david.g.johnston@gmail.com>
Cc: Pg Docs <pgsql-docs@lists.postgresql.org>
Date: 2020-08-17T17:11:04Z
Lists: pgsql-docs
Attachments
- fix-union-type-resolution-doc.patch (text/x-diff) patch
"David G. Johnston" <david.g.johnston@gmail.com> writes: > On Mon, Aug 17, 2020 at 8:31 AM Tom Lane <tgl@sss.pgh.pa.us> wrote: >> So this is just a verbatim statement of the algorithm, which is what >> I was hoping to avoid :-(. But maybe there's no simpler way. > I got nothin'. Yeah, me either. So here's a proposed patch, fixing a couple other things: * Re-reading this, I thought the use of "preferred" in the existing footnote about domains could be read as meaning that we treat the base type as a preferred type; so I changed that. * Something that's been true for a very long time, but never documented, is that CASE puts its ELSE clause at the front for this purpose. I figured that if we're trying to tell the full truth we better mention that. regards, tom lane
Commits
-
Doc: fix description of UNION/CASE/etc type unification.
- fd55df04edb9 11.10 landed
- b88f6ad54ce6 9.5.24 landed
- 8216a1d3ed27 13.0 landed
- 722564cf0d7c 9.6.20 landed
- 59fb9ef15561 10.15 landed
- 314f65716c37 12.5 landed
- 22e75a341ecc 14.0 landed