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

From Tom Lane
Subject Re: How are pg_operator and pg_type related with each other?
Date
Msg-id 28576.1389808042@sss.pgh.pa.us
Whole thread Raw
In response to Re: How are pg_operator and pg_type related with each other?  (Felix.徐 <ygnhzeus@gmail.com>)
List pgsql-general
=?GB2312?B?RmVsaXgu0Ow=?= <ygnhzeus@gmail.com> writes:
> I'm wondering where I can find the corresponding operatorID of eq/lt for a
> specific data type.

The ones ANALYZE uses are the members of the default btree opclass for
the datatype.  If there isn't one, it doesn't build a histogram.

> And another question is that how to update or insert a column with type of
> "anyarray", since I want to mock the statistic data of tables, the type of
> stavalues in pg_statistic is anyarray, is there any way to manually modify
> that column, by some kind of function or hook?

I don't believe that's possible from SQL; as you found out, the type
system won't allow it, and it'd be a security hole if it did (since
there wouldn't be any check that the data you store actually matches
the type of the column the pg_statistic row claims to be about).

            regards, tom lane


pgsql-general by date:

Previous
From: Ming Li
Date:
Subject: Re: non-zero xmax yet visible
Next
From: Oleg Bartunov
Date:
Subject: Re: Need Help to implement Proximity search feature