The edge version of do_postgre
1 ~ (1) SELECT "id", "digest", "fetched_at", "created_at ", "site_id" FROM "pages" WHERE ("site_id" IN (1)) ORDER BY "id" 2 ~ ERROR: syntax error at or near "("merb : worker (port 4000) ~ ERROR: syntax error at or near "(" - (PostgresEr ror)
The SQL that had been performed is here.
1 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 successful
Updates
I found the bug.
For example, this code
1 Page.repository.adap ter.execut e('SELECT * FROM "pages" WHERE ("id" IN ?) AND ("site_id" = ?)', [1], nil)
generates this sql
1 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
posted by
takiuchi
on Sun 7 Jun 2009
at 20:12