I added a little-endian special-case using the low order bits as described by Tom.
Also, I noticed that int2vector and oidvector are already flagged in pg_type with attstorage == 'p'. Really any type with attstorage == 'p' should be exempted from packed varlena handling since it isn't expecting to be toasted. This lets me clean up heaptuple.c a bit so now it doesn't depend on pg_type.h and doesn't have any special case exemption for oidvector and int2vector. It also means any other type can opt out from packed varlena packing by setting attstorage. I've left inet and cidr with toast support and changed them to have attstorage 'm' instead. http://community.enterprisedb.com/varlena/patch-varvarlena-17.patch.gz -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match