Skip site navigation (1) Skip section navigation (2)

Re: TEXT vs PG_NODE_TREE in system columns (cross column and expression statistics patch)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Boszormenyi Zoltan <zb(at)cybertec(dot)at>
Cc: pgsql-hackers(at)postgresql(dot)org, Hans-Juergen Schoenig <hs(at)cybertec(dot)at>
Subject: Re: TEXT vs PG_NODE_TREE in system columns (cross column and expression statistics patch)
Date: 2011-04-28 15:19:19
Message-ID: 27866.1304003959@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Boszormenyi Zoltan <zb(at)cybertec(dot)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

In response to

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2011-04-28 15:20:07
Subject: Re: TEXT vs PG_NODE_TREE in system columns (cross column and expression statistics patch)
Previous:From: Daniele VarrazzoDate: 2011-04-28 14:29:38
Subject: Re: Extension Packaging

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group