Use data-type specific conversion functions also in plpy.execute
Peter Eisentraut <peter_e@gmx.net>
Use data-type specific conversion functions also in plpy.execute In PLy_spi_execute_plan, use the data-type specific Python-to-PostgreSQL conversion function instead of passing everything through InputFunctionCall as a string. The equivalent fix was already done months ago for function parameters and return values, but this other gateway between Python and PostgreSQL was apparently forgotten. As a result, data types that need special treatment, such as bytea, would misbehave when used with plpy.execute.
Files
| Path | Change | +/− |
|---|---|---|
| src/pl/plpython/expected/plpython_types_3.out | modified | +90 −29 |
| src/pl/plpython/expected/plpython_types.out | modified | +61 −0 |
| src/pl/plpython/plpython.c | modified | +5 −40 |
| src/pl/plpython/sql/plpython_types.sql | modified | +50 −0 |