Looking at patch 04, it seems to me that it would be better to have
the OpcInfo struct carry the typecache struct rather than the type OID,
so that we can avoid repeated typecache lookups in brin_deform_tuple;
something like
/* struct returned by "OpcInfo" amproc */
typedef struct BrinOpcInfo
{/* Number of columns stored in an index column of this opclass */uint16 oi_nstored;
/* Opaque pointer for the opclass' private use */void *oi_opaque;
/* Typecache entries of the stored columns */TypeCacheEntry oi_typcache[FLEXIBLE_ARRAY_MEMBER];
} BrinOpcInfo;
Looking into it now.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services