greenplum-db/plcontainer

ERROR with prepared statements

BaiShaoqi opened this issue · 1 comments

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();

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.