[Catalyst] PostgreSQL quoting issues
Marius Kjeldahl
mariusauto-catalyst at kjeldahl.net
Wed Jan 16 15:15:57 GMT 2008
Joshua D. Drake wrote:
>> Does anybody have an idea how I can pursuade Postgres into accepting
>> this as just a simple string and that Postgres shouldn't try to
>> interpret anything in it?
>
> Yeah, quote the string. You can't submit an unquoted string to PostgreSQL.
As my original post demonstrated, that was not the issue at all. But I
found the reason for the bug. It seems IF in the following expression:
my $rsts = $c->model ('MintAppDB::TransSum')->find ({
category => $c->req->param ('category'),
sentto => $c->req->param ('sentto'),
iso => $c->req->param ('iso')
});
if category and iso pointed to undefined values, the bug I struggled
with was triggered. Making sure that they were defined took care of the
problem. I guess the sql generating stuff didn't like being fed
undefined values.
Thanks anyway,
Marius K.
More information about the Catalyst
mailing list