Re: Selecting strict, immutable text for a composite type. - Mailing list pgsql-general

From Tom Lane
Subject Re: Selecting strict, immutable text for a composite type.
Date
Msg-id 13325.1525988328@sss.pgh.pa.us
Whole thread Raw
In response to Re: Selecting strict, immutable text for a composite type.  (Steven Lembark <lembark@wrkhors.com>)
Responses Re: Selecting strict, immutable text for a composite type.
List pgsql-general
Steven Lembark <lembark@wrkhors.com> writes:
> On Thu, 10 May 2018 14:41:26 -0400
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Steven Lembark <lembark@wrkhors.com> 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


pgsql-general by date:

Previous
From: "Peter J. Holzer"
Date:
Subject: Re: Domain based on TIMEZONE WITH TIME ZONE
Next
From: "David G. Johnston"
Date:
Subject: Re: Selecting strict, immutable text for a composite type.