Subject: | Fails to execute queries with interval |
It is not possible to correctly execute SQL query that contains
interval.
Currently to work around this problem you have to insert value directly
in query.
# works
$stm = $db->prepare("SELECT interval '3 hours'");
$stm->execute();
# fails
$stm = $db->prepare("SELECT interval '? hours'");
$stm->execute(3);
# fails
$stm = $db->prepare("SELECT interval ?");
$stm->execute('3 hours');
I came across this problem on my FreeBSD-8.1 with perl 5.10.1 and
PostgreSQL 9.0.3