in reply to Re^2: DBI Prepared Update and NULLs
in thread DBI Prepared Update and NULLs

What version of PostgreSQL is your database? 7.3 changed the handling of booleans. Booleans can only be 't', 'true', 'y', '1', or 'f', 'false', 'n', '0'. The quotes around the string are required: 0 and 1 are not allowed.

This creates a problem for DBD::Pg since it detects Perl "booleans" as integers, and passes them without quotes. I remember that 7.3 would sometimes produce a parse error when it got an integer literal instead of giving a type error.

One solution is to make the string explicit:

$cgiparms{ 'orientation' } eq 'Landscape' ? 't' : 'f'