I have been talking with Theo some more about his recent problem with bytea arguments and results (see recent discussion on -bugs and also recent docs patch), what he needs is a way to have bytea (and possibly other unknown types) passed as binary data to and from plperl. The conversion overhead is too big both computationally and in increased memory usage. After discussing some possibilities, we decided that maybe the best approach would be to allow a custom GUC variable that would specify a list of types to be passed in binary form with no conversion, e.g.

 plperl.pass_as_binary = 'bytea, other-type'

This would affect function args, trigger data, return results, and I think it should also apply to arguments for SPI prepared queries and to SPI returned results.

If this seems like a good idea maybe it should go on the TODO list in whatever is the current incarnation.



---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at


Reply via email to