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 1fGtH6-0002ke-G7 for pgsql-general@arkaria.postgresql.org; Thu, 10 May 2018 21:38:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fGtH4-0004qs-1H for pgsql-general@arkaria.postgresql.org; Thu, 10 May 2018 21:38:54 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fGtH3-0004qj-MJ for pgsql-general@lists.postgresql.org; Thu, 10 May 2018 21:38:53 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fGtH1-0002ml-7L for pgsql-general@lists.postgresql.org; Thu, 10 May 2018 21:38:52 +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 w4ALcmbJ013326; Thu, 10 May 2018 17:38:48 -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: <20180510161648.4e5ea6a0@wrkhors.com> References: <20180510103041.472408bb@wrkhors.com> <20099.1525967568@sss.pgh.pa.us> <20180510132910.2fec9600@wrkhors.com> <30030.1525977686@sss.pgh.pa.us> <20180510161648.4e5ea6a0@wrkhors.com> Comments: In-reply-to Steven Lembark message dated "Thu, 10 May 2018 16:16:48 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <13324.1525988328.1@sss.pgh.pa.us> Date: Thu, 10 May 2018 17:38:48 -0400 Message-ID: <13325.1525988328@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Steven Lembark writes: > On Thu, 10 May 2018 14:41:26 -0400 > Tom Lane wrote: >> Steven Lembark writes: >>> 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. > But I thought that they could include functions of composite > types that were indexable (e.g., text)? Yeah, but that's not what you did. I think you could make that work with exclude using gist ( lat_lng_text(location) with =, effective with && ) but it's not going to apply the function without you telling it to. regards, tom lane