Hi,<br><br>In my app I have 'cachevect @@ to_tsquery(?)' in my WHERE clause and it proved to be impossible to have this, with those parents, generated by Abstract - the only way to have it is by literal.<br><br>--<br>Zbyszek
<br><br><div><span class="gmail_quote">On 7/11/06, <b class="gmail_sendername">Matt S Trout</b> &lt;<a href="mailto:dbix-class@trout.me.uk">dbix-class@trout.me.uk</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Jesper Krogh wrote:<br>&gt; Hi.. I have a table with elements of the followin form<br>&gt;<br>&gt; prefixdigit ... such as:<br>&gt; abs123<br>&gt; aasfdasdf91231231<br>&gt;<br>&gt; Then I've created to immutable stored procedures in postgresql and created an
<br>&gt; index on them:<br>&gt;<br>&gt; The stored procedures take the prefix in lower case and the digit.<br>&gt;<br>&gt; Thus.<br>&gt;<br>&gt; select element,prefix(element),digit(element)<br>&gt; gives (on Abs123).<br>
&gt;<br>&gt; Abs123,abs,123<br>&gt;<br>&gt; And using a select from the psql prompt makes Postgresql use the index:<br>&gt;<br>&gt; select * from table where prefix(element) = 'abs' and digit(element) &gt; 100;<br>&gt;<br>
&gt; How do I create this query using DBIx::Class?<br><br>Probably using a literal SQL chunk; SQL::Abstract isn't as smart as it might<br>be about handling functions in the WHERE clause.<br><br>--<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Matt S Trout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Offering custom development, consultancy and support
<br>&nbsp;&nbsp; Technical Director&nbsp;&nbsp;&nbsp;&nbsp;contracts for Catalyst, DBIx::Class and BAST. Contact<br>Shadowcat Systems Ltd.&nbsp;&nbsp;mst (at) <a href="http://shadowcatsystems.co.uk">shadowcatsystems.co.uk</a> for more information<br><br>+ Help us build a better perl ORM: 
<a href="http://dbix-class.shadowcatsystems.co.uk/">http://dbix-class.shadowcatsystems.co.uk/</a> +<br><br>_______________________________________________<br>List: <a href="http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class">
http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class</a><br>Wiki: <a href="http://dbix-class.shadowcatsystems.co.uk/">http://dbix-class.shadowcatsystems.co.uk/</a><br>IRC: irc.perl.org#dbix-class<br>SVN: <a href="http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/">
http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/</a><br>Searchable Archive: <a href="http://www.mail-archive.com/dbix-class@lists.rawmode.org/">http://www.mail-archive.com/dbix-class@lists.rawmode.org/</a><br></blockquote>
</div><br><br clear="all"><br>-- <br>Zbigniew Lukasiak<br><a href="http://brudnopis.blogspot.com/">http://brudnopis.blogspot.com/</a>