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 1kXSW6-0005fU-Ow for pgsql-hackers@arkaria.postgresql.org; Tue, 27 Oct 2020 17:12:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kXSW5-0002f6-HN for pgsql-hackers@arkaria.postgresql.org; Tue, 27 Oct 2020 17:12:13 +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 1kXSW4-0002ez-De for pgsql-hackers@lists.postgresql.org; Tue, 27 Oct 2020 17:12:13 +0000 Received: from forward2-smtp.messagingengine.com ([66.111.4.226]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kXSW1-0002hk-Pc for pgsql-hackers@postgresql.org; Tue, 27 Oct 2020 17:12:11 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailforward.nyi.internal (Postfix) with ESMTP id EB3BB1940B5E; Tue, 27 Oct 2020 13:12:07 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 27 Oct 2020 13:12:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=WBqCTbUwNlEN57IIbdlGoreNyvV4FR8p+kfODP0tx ig=; b=bya+KwoilVPzYWVCQqSvxxfECOnSfJEWaUIeJPYK+xffLprXphvt2DPl9 OtXOBVnVgReEnXekyzLcePbgiuiHnLBT3+zzxsHicV6SnuO2S9nj0K+YKU7LS4x0 nNh3cmDhg6YU1Op338vA3/gP1Bpg1dukHBKGfGiyu9X08JBrO2HF/yq4dkYmMUPP afs3O2Lo+PP3Z6e6vygkaUMurcGfxDau5w2E7E+YiD4a3gyk0LH+QClCglndica7 heWs4hYVr3DsBFECTVNbbNxRfYK2aum6hVTwnIywSfC6jQE9a6ZpTBgL9RZGIMhu /zNgq8eO9/yMO3oh2S1CmFfZBtqOg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrkeelgdelkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhfhokffffgggjggtgfesthejredttdefjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsedvnhguqh hurggurhgrnhhtrdgtohhmqeenucggtffrrghtthgvrhhnpedtveeghedtjedvvedvleej ueevjeejtdellefgkeelfeeikeejlefgkedtudeuvdenucffohhmrghinhepvdhnughquh grughrrghnthdrtghomhenucfkphepkeejrddujeejrdejuddrvddvjeenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrrdgvihhsvg hnthhrrghuthesvdhnughquhgrughrrghnthdrtghomh X-ME-Proxy: Received: from april.pezone.net (p57b147e3.dip0.t-ipconnect.de [87.177.71.227]) by mail.messagingengine.com (Postfix) with ESMTPA id 99ADA3064683; Tue, 27 Oct 2020 13:12:06 -0400 (EDT) Subject: Re: select_common_typmod To: Heikki Linnakangas , pgsql-hackers References: <97df3af9-8b5e-fb7f-a029-3eb7e80d7af9@2ndquadrant.com> <3152222d-4792-d75b-46a8-de22ebb0de31@iki.fi> From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: Date: Tue, 27 Oct 2020 18:12:05 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <3152222d-4792-d75b-46a8-de22ebb0de31@iki.fi> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-10-26 10:05, Heikki Linnakangas wrote: >> There might have been a tiny bug in transformValuesClause() because >> while consolidating the typmods it does not take into account whether >> the types are actually the same (as more correctly done in >> transformSetOperationTree() and buildMergedJoinVar()). > > Hmm, it seems so, but I could not come up with a test case to reach that > codepath. I think you'd need to create two types in the same > typcategory, but with different and incompatible typmod formats. Yeah, something like that. > The patch also adds typmod resolution for hypothetical ordered-set > aggregate arguments. I couldn't come up with a test case that would > tickle that codepath either, but it seems like a sensible change. You > might want to mention it in the commit message though. OK, committed with that. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services