In syscache.c, the structure cachedesc contains a field reloidattr that is
supposed to contain the number of an attribute that is an OID reference to
another table.  But what if there are two such attributes?

The concrete case is an index on pg_cast (castsource, casttarget), which
both reference pg_type.

-- 
Peter Eisentraut   peter_e@gmx.net


Wed, 10 Jul 2002 00:17:52 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
Question about syscache
Peter Eisentraut <peter_e@gmx.net> writes:
> In syscache.c, the structure cachedesc contains a field reloidattr that is
> supposed to contain the number of an attribute that is an OID reference to
> another table.  But what if there are two such attributes?

Specifically, it is a reference to pg_class.

> The concrete case is an index on pg_cast (castsource, casttarget), which
> both reference pg_type.

That is not a reference to pg_class, so you should not make reloidattr
reference it.

The point of reloidattr is that during a relation cache clear event,
it allows catcache to find all catcache rows that are related to that
relation cache entry (eg, pg_attribute, pg_trigger, etc).  So far
there's not been need for more than one such attribute per tuple.

			regards, tom lane

Tue, 09 Jul 2002 18:36:29 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: Question about syscache 