ERROR with prepared statements
BaiShaoqi opened this issue · 1 comments
BaiShaoqi commented
Expected behavior
test_prep_bool_input
----------------------
1
(1 row)
Actual behavior
ERROR: PL/Container client exception occurred:
DETAIL: Exception occurred transforming result object to int1
Step to reproduce the behavior
CREATE OR REPLACE FUNCTION test_prep_bool_input() RETURNS int
AS $$
# container: plc_python_shared
plan = plpy.prepare("SELECT CASE WHEN $1 THEN 1 ELSE 0 END AS val", ['boolean'])
rv = plpy.execute(plan, ['fa'], 5) # 'fa' is true in Python
return rv[0]['val']
$$ language plcontainer;
SELECT test_prep_bool_input();