Re: How are pg_operator and pg_type related with each other? - Mailing list pgsql-general

From Amit Langote
Subject Re: How are pg_operator and pg_type related with each other?
Date
Msg-id CA+HiwqHy-Q-hDPudAiBRcyddVYCxsuBGcwt8ssSU46hxET_0UA@mail.gmail.com
Whole thread Raw
In response to How are pg_operator and pg_type related with each other?  (Felix.徐 <ygnhzeus@gmail.com>)
Responses Re: How are pg_operator and pg_type related with each other?  (Felix.徐 <ygnhzeus@gmail.com>)
List pgsql-general
On Wed, Jan 15, 2014 at 11:08 PM, Felix.徐 <ygnhzeus@gmail.com> wrote:
> Hi all,
> I'm studying pg_statistic table and I find that column staop is related to
> pg_operator, and different data types relate to different staop, but I don't
> know where pgsql stores the mapping between pg_type and pg_operator, does
> anyone have any idea about it? thanks!

Rather, different "kinds" of statistics are related to different
operators. So, "staop2" would refer to an operator suitable/applicable
for the statistics of kind "stakind2".

For example stakind2 for some attribute could be value "3" which
refers to statistic kind "histogram". In this case, staop2 for the
same attribute could refer to operator, say, "<" because this
particular operator could benefit from histogram distribution of
values. (off course, "<" may be overloaded for different types; but
point to take from this is that any "<" uses the statistic called
histogram.)

--
Amit Langote


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: how is text-equality handled in postgresql?
Next
From: itishree sukla
Date:
Subject: Need Help to implement Proximity search feature