=ERROR REPORT==== 6-Aug-2013::10:04:58 ===
** State machine <0.1053.0> terminating
** Last message in was {'$gen_sync_event',
{<0.1051.0>,#Ref<0.0.0.199>},
{equery,
{statement,[],
[{column,<<"name">>,varchar,-1,54,1}],
[int4]},
[{int4,[1,2,4]}]}}
** When State == ready
** Data == {state,undefined,<0.1054.0>,5000,
[{<<"application_name">>,<<>>},
{<<"client_encoding">>,<<"UTF8">>},
{<<"DateStyle">>,<<"ISO, MDY">>},
{<<"integer_datetimes">>,<<"on">>},
{<<"IntervalStyle">>,<<"postgres">>},
{<<"is_superuser">>,<<"on">>},
{<<"server_encoding">>,<<"UTF8">>},
{<<"server_version">>,<<"9.2.3">>},
{<<"session_authorization">>,<<"postgres">>},
{<<"standard_conforming_strings">>,<<"on">>},
{<<"TimeZone">>,<<"US/Central">>}],
undefined,
{<0.1051.0>,#Ref<0.0.0.198>},
undefined,
{11102,347906346},
{statement,[],undefined,[int4]},
73}
** Reason for termination =
** {badarg,[{pgsql_binary,encode,2,[{file,"src/pgsql_binary.erl"},{line,14}]},
{pgsql_connection,encode_parameter,1,
[{file,"src/pgsql_connection.erl"},{line,626}]},
{pgsql_connection,encode_parameters,4,
[{file,"src/pgsql_connection.erl"},{line,618}]},
{pgsql_connection,ready,3,
[{file,"src/pgsql_connection.erl"},{line,228}]},
{gen_fsm,handle_msg,7,[{file,"gen_fsm.erl"},{line,494}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}
** exception exit: badarg
in function pgsql_binary:encode/2 (src/pgsql_binary.erl, line 14)
in call from pgsql_connection:encode_parameter/1 (src/pgsql_connection.erl, line 626)
in call from pgsql_connection:encode_parameters/4 (src/pgsql_connection.erl, line 618)
in call from pgsql_connection:ready/3 (src/pgsql_connection.erl, line 228)
in call from gen_fsm:handle_msg/7 (gen_fsm.erl, line 494)
in call from proc_lib:init_p_do_apply/3 (proc_lib.erl, line 239)
both work fine.
The following query works:
whereas this one does not:
The only difference is the use of
id in ($1)vs.id = any ($1). The second version results in an error:Both queries work just fine if run manually from the command line, i.e.,
and
both work fine.