I found this interesting:
> 3. You might be able to get away with doing a $prepare->(q{INSERT INTO
> thistab VALUES(now() + ?});
For those who might need the information:
OS WinNT/cygwin, Perl 5.8, Postgres 7.3, DBI 1.32, DBD::Pg 1.21

my $sth = $dbh->prepare( "select entered + '5 day' from temp") or
print"prepare fails\n";
Works, as does:
$f = '10 year + 5 day + 1 minute';
my $sth = $dbh->prepare( "select entered + ? from temp") or print"prepare
fails\n";
$sth ->bind_param(1, $f);
where entered is a timestamp without time zone column.
David


Reply via email to