[Dbix-class] 2-argument SQL agregates
Doran L. Barton
fozz at iodynamics.com
Tue Mar 28 18:53:28 CEST 2006
Matt S Trout wrote:
> Doran L. Barton wrote:
>> I specifically need to use the TO_CHAR() function which takes a field
>> name and a format string:
>>
>> SELECT foo, TO_CHAR('bar', 'Month DD YYYYY') FROM Artist
>
> { TO_CHAR => [ 'bar', 'Month DD YYYY' ] } ?
>
> Always try the obvious thing first (this assumes you have quoting turned on.
> if you don't, you probably want \"'Month DD YYYY'")
That's what I thought, but it wasn't working. I've updated to DBIx::Class
0.06 (was running an older version) and still having problems. Let me expose
more of the environment:
Fedora Core Linux 4 (i386) (Perl 5.8.6)
PostgreSQL 8.0.7 backend
DBD::Pg 1.47
Here is the error showing up in the logs now when I try using the above code
to include a TO_CHAR(arg1, arg2) in the code:
Cannot mix placeholder styles ":foo" and "?" at
/usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi/DBD/Pg.pm line 188.
Any other suggestions?
--
fozz at iodynamics.com is Doran L. Barton, president, Iodynamics LLC
Iodynamics: Linux solutions - Web development - Business connectivity
"Please do not wash hair or clothes in toilet."
-- Seen in a Tokyo restroom
More information about the Dbix-class
mailing list