[CDBI] Type binding

Bill Moseley moseley at hank.org
Wed Jun 7 20:08:47 BST 2006


On Wed, Jun 07, 2006 at 02:54:10PM -0400, Perrin Harkins wrote:
> On Tue, 2006-06-06 at 22:19 -0700, Bill Moseley wrote:
> > I received this error on Postgresql 8.1.3:
> > 
> > : DBD::Pg::st execute failed: ERROR:  invalid input syntax for type boolean: "34696"
> >  [for Statement "SELECT me.id, me.cart, me.registration, me.transaction_by, me.transaction_time, me.amount, me.transaction_id, me.transaction_type, me.invoice, me.comment
> > FROM   cart_transaction me
> > WHERE  ( me.cart = ? )  ORDER BY transaction_time 
> > " with ParamValues: 1='34696'] at /home/moseley/local/share/perl/5.8.4/DBIx/ContextualFetch.pm line 52.
> >  at /home/moseley/local/share/perl/5.8.4/Class/DBI/Relationship/HasMany.pm line 144
> > 
> > The query works fine in psql.
> 
> Try it in vanilla DBI.  It doesn't look like a Class::DBI thing, but
> it's hard to be sure.  DBI is usually good about guessing data types.

It's now working after a restart of the mod_perl server.  I suspect
if I tried it in DBI it would have also worked because it was a new
process.

I'm now just curious about what happened to cause the problem to show
up.

-- 
Bill Moseley
moseley at hank.org




More information about the ClassDBI mailing list