Handle Aggref->aggargtypes in out/readfuncs.c
authorTomas Vondra <tomas@2ndquadrant.com>
Tue, 19 Sep 2017 21:06:46 +0000 (23:06 +0200)
committerTomas Vondra <tomas@2ndquadrant.com>
Tue, 19 Sep 2017 21:06:46 +0000 (23:06 +0200)
commit6e08be4760267a29972094954543962034887596
tree446a1da99c193b33ddf7d1838d782ab9b993f0d6
parentb05a0a0b5609c547965efbb5d499fb7cc36a4315
Handle Aggref->aggargtypes in out/readfuncs.c

When communicating with other nodes, we send names of objects instead
of OIDs as those are assigned on each node independently. We failed to
do this for Aggref->aggargtypes, which worked fine for built-in data
types (those have the same OID on all nodes), but resulted in failures
for custom data types (like for example FIXEDDECIMAL).

   ERROR:  cache lookup failed for type 16731

This fixes it by implementing READ/WRITE_TYPID_LIST_FIELD, similarly
to what we had for RELID.

Note: Turns out the WRITE_RELID_LIST_FIELD was broken, but apparently
we never call it in XL as it's only used for arbiterIndexes field. So
fix that too, in case we enable the feature in the future.
src/backend/nodes/outfuncs.c
src/backend/nodes/readfuncs.c