Re: Implied Functional Index use - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Implied Functional Index use
Date
Msg-id 1508.1152758098@sss.pgh.pa.us
Whole thread Raw
In response to Re: Implied Functional Index use  (Simon Riggs <simon@2ndquadrant.com>)
Responses Re: Implied Functional Index use
List pgsql-hackers
Simon Riggs <simon@2ndquadrant.com> writes:
> Normally, I would not suggest that we do things only for certain data
> types only. In this case however, it seems that the reason it would work
> only for INTEGER and TEXT data types is that they are simple atomic
> datatypes that have the required properties. So doing this for those
> datatypes only seems permissable on a theoretical basis, rather than
> just because we can't be bothered to do it for more complex types.

There's nothing simple nor atomic about TEXT, and in fact until very
recently text_eq was NOT true equality by this definition.  See
discussions about hu_HU locale back in December.  A number of people
thought that fix was an ugly kluge, and so we may someday go back to
a behavior in which text_eq is again not true equality --- in particular
I'm dubious that such a restriction can survive once we support multiple
encodings/collations in the same database.

More generally, I don't believe in hacks that only work for a small
number of built-in types: to me, that's prima facie evidence that you
haven't thought the problem through.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: pgsql-patches considered harmful
Next
From: Tom Lane
Date:
Subject: Re: Three weeks left until feature freeze