What steps will reproduce the problem?
Executing any query on Postgres which uses a parameterized list query as shown
in the examples (e.g. where Id in @Ids", new { Ids = new int[] { 1, 2, 3 }})
What is the expected output? What do you see instead?
Should execute the query, but we get a Postgres error instead: operator does
not exist: character varying = text[].
What version of the product are you using? On what operating system?
Running on mono 2.10.8.1 on Ubuntu precise, but shouldn't matter.
Please provide any additional information below.
The problem is simple... In Postgres you can't use the IN SQL operator to check
against arrays, you must use the special ANY keyword. Basically:
Bombs: DELETE FROM table WHERE id IN @Ids
Works: DELETE FROM table WHERE id = ANY @Ids
This makes the SQL for parameterized lists database-dependent. At the very
least maybe add a note in the dapper doc page?
Original issue reported on code.google.com by r...@roji.org on 25 Jul 2012 at 2:30
Original issue reported on code.google.com by
r...@roji.org
on 25 Jul 2012 at 2:30