Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k7h6L-0003c7-Mb for pgsql-docs@arkaria.postgresql.org; Mon, 17 Aug 2020 15:31:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k7h6K-00018K-Hy for pgsql-docs@arkaria.postgresql.org; Mon, 17 Aug 2020 15:31:08 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k7h6K-00018C-2B for pgsql-docs@lists.postgresql.org; Mon, 17 Aug 2020 15:31:08 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k7h6H-00078e-Ep for pgsql-docs@lists.postgresql.org; Mon, 17 Aug 2020 15:31:06 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 07HFV4Uj1073005; Mon, 17 Aug 2020 11:31:04 -0400 From: Tom Lane To: "David G. Johnston" cc: Pg Docs Subject: Re: Inaccurate description of UNION/CASE/etc type selection In-reply-to: References: <1019930.1597613200@sss.pgh.pa.us> <1031918.1597624366@sss.pgh.pa.us> Comments: In-reply-to "David G. Johnston" message dated "Sun, 16 Aug 2020 18:06:25 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1073003.1597678264.1@sss.pgh.pa.us> Date: Mon, 17 Aug 2020 11:31:04 -0400 Message-ID: <1073004.1597678264@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk "David G. Johnston" writes: > More concisely: > Make the first input type a candidate type. Each subsequent input type is > compared to the current candidate, with a new candidate being chosen only > when there exists a non-mutal implicit cast to the new type. If at any > point a preferred type is made a candidate then it will be chosen. 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. regards, tom lane