10> epgsql:equery(<<"db_master:0">>, "SELECT ARRAY[0,1,2,3,4] @> $1", [ [1, 3] ]).
{ok,[{column,<<"?column?">>,bool,1,-1,1}],[{true}]}
11> epgsql:equery(<<"db_master:0">>, "SELECT ARRAY[0,1,2,3,4] @> $1", [ [1, 5] ]).
{ok,[{column,<<"?column?">>,bool,1,-1,1}],[{false}]}
10> epgsql:equery(Connection, "SELECT ARRAY[0,1,2,3,4] @> $1", [ [1, 3] ]).
{ok,[{column,<<"?column?">>,bool,1,-1,1}],[{true}]}
11> epgsql:equery(Connection, "SELECT ARRAY[0,1,2,3,4] @> $1", [ [1, 5] ]).
{ok,[{column,<<"?column?">>,bool,1,-1,1}],[{false}]}
--
You received this message because you are subscribed to the Google Groups "Erlang epgsql Postgres driver use and development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to epgsql+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
SELECT * FROM tab WHERE id = ANY(ARRAY[2, 3, 4])
SELECT * FROM tab WHERE id IN (SELECT(unnest(ARRAY[2, 3, 4])))
epgsql:equery(C, "SELECT id FROM forwarding WHERE id = ANY($1)", [[1000, 1001, 1002]]).
epgsql:equery(C, "SELECT id FROM forwarding WHERE id IN (SELECT(unnest($1::int[])))", [[1000, 1001, 1002]]).