Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fGqVS-00064t-Jl for pgsql-general@arkaria.postgresql.org; Thu, 10 May 2018 18:41:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fGqVR-0007zi-JX for pgsql-general@arkaria.postgresql.org; Thu, 10 May 2018 18:41:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fGqVR-0007zQ-BB for pgsql-general@lists.postgresql.org; Thu, 10 May 2018 18:41:33 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fGqVN-0007H0-8P for pgsql-general@lists.postgresql.org; Thu, 10 May 2018 18:41:32 +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 w4AIfQuN030031; Thu, 10 May 2018 14:41:26 -0400 From: Tom Lane To: Steven Lembark cc: pgsql-general@lists.postgresql.org Subject: Re: Selecting strict, immutable text for a composite type. In-reply-to: <20180510132910.2fec9600@wrkhors.com> References: <20180510103041.472408bb@wrkhors.com> <20099.1525967568@sss.pgh.pa.us> <20180510132910.2fec9600@wrkhors.com> Comments: In-reply-to Steven Lembark message dated "Thu, 10 May 2018 13:29:10 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <30029.1525977686.1@sss.pgh.pa.us> Date: Thu, 10 May 2018 14:41:26 -0400 Message-ID: <30030.1525977686@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk [ please keep the list cc'd ] Steven Lembark writes: > On Thu, 10 May 2018 11:52:48 -0400 > Tom Lane wrote: >> Maybe you should show a more concrete example of what's not working. > The problem is with gists telling me that they cannot index > the type. This works for enums, just not the composite type. Oh, well, they can't. There's no GiST opclass covering arbitrary composite types. This doesn't seem very surprising to me given the lack of operators that such an opclass might accelerate. What are you expecting an index on such a column to do for you? If you just want a uniqueness constraint, plain btree can handle it. regards, tom lane