Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ixdiW-0007Dj-BD for pgsql-hackers@arkaria.postgresql.org; Fri, 31 Jan 2020 21:20:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ixdiU-0004te-Ss for pgsql-hackers@arkaria.postgresql.org; Fri, 31 Jan 2020 21:20:42 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ixdiT-0004tX-W8 for pgsql-hackers@lists.postgresql.org; Fri, 31 Jan 2020 21:20:42 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ixdiR-0001qI-MC for pgsql-hackers@lists.postgresql.org; Fri, 31 Jan 2020 21:20:40 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 00VLKaqB023584; Fri, 31 Jan 2020 16:20:36 -0500 From: Tom Lane To: Julien Rouhaud cc: Amit Langote , PostgreSQL Hackers Subject: Re: unsupportable composite type partition keys In-reply-to: References: <5361.1576602769@sss.pgh.pa.us> <28160.1576676326@sss.pgh.pa.us> <26766.1576947735@sss.pgh.pa.us> <7782.1577051475@sss.pgh.pa.us> Comments: In-reply-to Julien Rouhaud message dated "Fri, 31 Jan 2020 11:25:07 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <23582.1580505636.1@sss.pgh.pa.us> Date: Fri, 31 Jan 2020 16:20:36 -0500 Message-ID: <23583.1580505636@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Julien Rouhaud writes: > On Sun, Dec 22, 2019 at 10:51 PM Tom Lane wrote: >> While poking at this, I also started to wonder why CheckAttributeType >> wasn't recursing into ranges, since those are our other kind of >> container type. And the answer is that it must, because we allow >> creation of ranges over composite types: > While working on regression tests for index collation versioning [1], > I noticed that the 2nd patch apparently broke the ability to create a > table using a range over collatable datatype attribute, which we > apparently don't test anywhere. Ugh. > AFAICT, this is only a thinko in CheckAttributeType(), where the range > collation should be provided rather than the original tuple desc one, > as per attached. I also added a create/drop table in an existing > regression test that was already creating range over collatable type. Looks good, although I think maybe we'd better test the case a little harder than this. Will tweak that and push -- thanks! regards, tom lane