|Syntactic Confectionery Delight|
SQL function from DBICby Sixtease (Friar)
|on Dec 07, 2008 at 15:10 UTC||Need Help??|
Sixtease has asked for the
wisdom of the Perl Monks concerning the following question:
I'm working my way through with DBIC in Catalyst and I found myself needing to simply call a postgres function from a template (or from the controller if must be).
I have an enum type in the database and would like to generate <option>s for them within a <select>.
I'd like to see the result of the postgres function enum_range.
I was searching for a simple mechanism that would let me enter arbitrary SQL (not just the condition part), so I could write SELECT enum_range(typename);. But I have failed to find one.
Do you have any advice?
use strict; use warnings; print "Just Another Perl Hacker\n";