[Catalyst] PostgreSQL quoting issues
Joshua D. Drake
jd at commandprompt.com
Wed Jan 16 14:58:48 GMT 2008
Marius Kjeldahl wrote:
> I've got an application where I do the following:
> It seems Postgres gets confused with my usage of a variable with colon
> in it, and the default quoting being done on strings somewhere in
> DBD::Pg or DBIx::Class doesn't seem to pursuade Postgres from
> interpreting the string with the colon in as a special "variable" field
> (or whatever, I haven't looked to deep into this functionality of
> Postgres).
This doesn't have anything to do with PostgreSQL. This appears to be a
driver issue.
> instead, hoping that manually calling quote from the dbh driver from
> DBD::Pg would take care of it, but no such luck.
>
> The error message being generated by Catalyst/DBIx::Class is:
>
> Cannot mix placeholder styles ":foo" and "?"
>
> 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.
Sincerely,
Joshua D. Drake
More information about the Catalyst
mailing list