bitnine-oss / agensgraph

AgensGraph, a transactional graph database based on PostgreSQL
http://www.agensgraph.org
Other
1.33k stars 148 forks source link

fix: Improper type casting of ANY*OID (AG-255) #480

Closed jrgemignani closed 5 years ago

jrgemignani commented 5 years ago

This fix is to correct issue AG-255 "The Collect function...".

The issue is caused by our new coerce_expr function processing ANY*OID (ex: ANYARRAYOID, ANYENUMOID, etc) output types and wrapping them in a CypherTypeCast node.

Prior to AG-245, the coerce_to_target_type function processed the ANY*OID output types and just returned the node.

This fix adds in checks for ANY*OID output types so that we avoid processing them and leave them for coerce_to_target_type.

-jrg