Re: How are pg_operator and pg_type related with each other?

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Felix(dot)徐 <ygnhzeus(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: How are pg_operator and pg_type related with each other?
Date: 2014-01-15 14:51:04
Message-ID: CA+HiwqHy-Q-hDPudAiBRcyddVYCxsuBGcwt8ssSU46hxET_0UA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Jan 15, 2014 at 11:08 PM, Felix.徐 <ygnhzeus(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message saggarwal 2014-01-15 15:04:33 Re: pg_depend OBJID not found
Previous Message Tom Lane 2014-01-15 14:43:40 Re: how is text-equality handled in postgresql?