A few days ago I was complaining that we needed to adjust the SPI and parser APIs so that callers could pass in collation values for Param symbols. After some review of the code, I think we can get away without that. Instead, let's just legislate that you have to use a parser callback hook if you want to create Param nodes that have a collation different from their type's default collation. plpgsql already uses a callback hook. The only other place that seems to need non-default Param collations is SQL functions, so they would need to change to use a callback hook instead of just passing a fixed parameter-type OID array. But the SQL function code would have to change anyway to pass collations through from the function's input collation. So there's really very little that we'd gain by modifying the behavior of the parse_param.c hooks, and the amount of API churn needed to do that is unreasonably large.
regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers