Doran L. Barton wrote: > Doran L. Barton wrote: >> 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'") > >> 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. > > Well, I tried quoting the format string like you suggested and... what do > you know?! IT WORKED! > > Quoting? Turn on? Could you point me in the general direction?
Storage::DBI - $storage->sql_maker->quote_char -- Matt S Trout Offering custom development, consultancy and support Technical Director contracts for Catalyst, DBIx::Class and BAST. Contact Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information + Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ + _______________________________________________ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix-class.shadowcatsystems.co.uk/ IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/