Re: TEXT vs PG_NODE_TREE in system columns (cross column and expression statistics patch) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: TEXT vs PG_NODE_TREE in system columns (cross column and expression statistics patch)
Date
Msg-id 27866.1304003959@sss.pgh.pa.us
Whole thread Raw
In response to TEXT vs PG_NODE_TREE in system columns (cross column and expression statistics patch)  (Boszormenyi Zoltan <zb@cybertec.at>)
List pgsql-hackers
Boszormenyi Zoltan <zb@cybertec.at> writes:
> My question is that why pg_node_tree is unusable as
> syscache attribute? I attempted to alias it as text in the patch
> but I get the following error if I try to use it by setting
> USE_SYSCACHE_FOR_SEARCH to 1 in selfuncs.c.
> Directly using the underlying pg_statistic3 doesn't cause an error.

I'm not sure what you're running into, but it doesn't matter because the
design would be unworkable anyway.  Expression text representations
could be extremely long, too long to be usable as index keys.  I don't
believe either of the proposed indexes on the new catalogs are workable,
actually, and the catalog definitions themselves seem a bit outre.
Why are you setting it up so that stats on expressions and cross-column
stats are mutually exclusive?

The idea that's used currently is that we only compute stats on
expressions that are indexed, so the OID/attnum of the index column
can be used as a reference in pg_statistic.  I don't see a strong
need to deviate from that approach.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Boszormenyi Zoltan
Date:
Subject: TEXT vs PG_NODE_TREE in system columns (cross column and expression statistics patch)
Next
From: Alvaro Herrera
Date:
Subject: Re: TEXT vs PG_NODE_TREE in system columns (cross column and expression statistics patch)