The edge version of do_postgres with JRuby causes misterious error like this.
pre>>
~ (1) SELECT "id", "digest", "fetched_at", "created_at", "site_id" FROM "pages" WHERE ("site_id" IN (1)) ORDER BY "id"
~ ERROR: syntax error at or near "("merb : worker (port 4000) ~ ERROR: syntax error at or near "(" - (PostgresError)
<<--
The SQL that had been performed is here.
sql>>
SELECT "id", "digest", "fetched_at", "created_at", "site_id" FROM "pages" WHERE ("site_id" IN (1)) ORDER BY "id"
<<--
This is able to be performed successfully at the psql console.
So I wonder what the error message means.
Updates
I found the bug.
For example, this code
pre>>
Page.repository.adapter.execute('SELECT * FROM "pages" WHERE ("id" IN ?) AND ("site_id" = ?)', [1], nil)
<<--
generates this sql
sql>>
SELECT * FROM "pages" WHERE ("id" IN (1)) AND ("site_id" = (NULL))
<<--
(NULL) causes parsing error.
This issue happens if the first value is an Array and the succeeding values are not Arrays.