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 1fH01N-0007j4-EB for pgsql-general@arkaria.postgresql.org; Fri, 11 May 2018 04:51:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fH01M-0002tS-2w for pgsql-general@arkaria.postgresql.org; Fri, 11 May 2018 04:51:08 +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 1fH01L-0002tJ-RL for pgsql-general@lists.postgresql.org; Fri, 11 May 2018 04:51:07 +0000 Received: from 23-25-19-49-static.hfc.comcastbusiness.net ([23.25.19.49] helo=jeeves.wrkhors.com) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fH01I-0005C6-Q1 for pgsql-general@lists.postgresql.org; Fri, 11 May 2018 04:51:07 +0000 Received: from wrkhors.com (localhost [127.0.0.1]) by jeeves.wrkhors.com (Postfix) with ESMTP id F28003AB735; Fri, 11 May 2018 00:02:02 -0500 (CDT) Date: Thu, 10 May 2018 23:49:24 -0500 From: Steven Lembark To: Tom Lane Cc: pgsql-general@lists.postgresql.org, lembark@wrkhors.com Subject: Re: Selecting strict, immutable text for a composite type. Message-ID: <20180510234924.01bf3685@wrkhors.com> In-Reply-To: <13325.1525988328@sss.pgh.pa.us> 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> <13325.1525988328@sss.pgh.pa.us> Organization: Workhorse Computing MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, 10 May 2018 17:38:48 -0400 Tom Lane wrote: > 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. Q: Why does it work with enums? e.g., If I create a type foo_t as enum (...) and install the function foo_text on foo_t the gist works. Why would the presence of a text verison of the composite not get used the same way? If the function works I'm happy, I just don't see the reasoning behind having the enum's supported automatically and the composite not handled. enjoi -- Steven Lembark 1505 National Ave Workhorse Computing Rockford, IL 61103 lembark@wrkhors.com +1 888 359 3508