You are totally right, probably the same issue. Thanks for the link!

El 25/09/14 a las #4, Tim Griffin escribió:
> Sorry, wrong link earlier posting. 
> 
> This issue I raised is very closely related, just for additional background:
> https://groups.google.com/d/msg/hobousers/qrnSSyzDAZQ/vBYoMGIUuVkJ
> 
> Tim
> 
> 
> 
> On Thursday, September 25, 2014 7:34:02 AM UTC-4, Ignacio Huerta wrote:
> 
>     Thanks Don, I'll create an issue in Github and try to get to it ASAP.
> 
>     Regards,
>     Ignacio
> 
>     El 20/09/14 a las #4, Donald Ziesig escribió:
>     > Hi Ignacio,
>     >
>     > It appears that the problem is associated with postgres.  I tried the
>     > same code with sqlite3 and it works as expected.  From the errors, I
>     > think that there is a bug in the search code that uses the ILIKE
>     > operator for integers which gives a type conversion error in
>     postgres.
>     >
>     > Note that the error occurs when the integer column is included in the
>     > list of searchable columns without regards to the type of the search
>     > field contents.
>     >
>     > I uploaded two versions to github, the only difference between
>     them is
>     > in database.yml:
>     >
>     > https://github.com/dziesig/test_integer_search.git
>     <https://github.com/dziesig/test_integer_search.git>    -- this one
>     works
>     > (uses sqlite3)
>     >
>     > https://github.com/dziesig/pg_integer_search.git
>     <https://github.com/dziesig/pg_integer_search.git>    -- this one fails
>     > (uses postgres)
>     >
>     > The officers table is populated with:
>     >
>     > President         1
>     >
>     > Vice President    2
>     >
>     > Secretary         3
>     >
>     > Treasurer         4
>     >
>     > Trustee           5
>     >
>     >
>     > Thanks for your help,
>     >
>     > Don Ziesig
>     >
>     > On 09/18/2014 01:38 PM, Ignacio Huerta wrote:
>     >> Never seen this before. Can you give us a bit more information about
>     >> your model and the table plus in order to reproduce?
>     >>
>     >> Regards,
>     >> Ignacio
>     >>
>     >> El 14/09/14 a las #4, Donald Ziesig escribió:
>     >>> Hi All!
>     >>>
>     >>> I'm not sure if this is a bug in hobo or rails, but if I try to
>     search
>     >>> on an integer column using table-plus I get an SQL error:
>     >>>
>     >>>
>     >>>      PG::UndefinedFunction: ERROR: operator does not exist:
>     integer ~~*
>     >>>      unknown LINE 1: ...member_positions" WHERE
>     (((member_positions.rank
>     >>>      ILIKE '%2%... ^ HINT: No operator matches the given name and
>     >>>      argument type(s). You might need to add explicit type casts. :
>     >>>      SELECT COUNT(*) FROM "member_positions" WHERE
>     >>>      (((member_positions.rank ILIKE '%2%')))
>     >>>
>     >>> Don Ziesig
>     >>>
>     >>>
>     >>>
>     >>>
>     >>> --
>     >>> You received this message because you are subscribed to the Google
>     >>> Groups "Hobo Users" group.
>     >>> To unsubscribe from this group and stop receiving emails from
>     it, send
>     >>> an email to [email protected] <javascript:>
>     >>> <mailto:[email protected] <javascript:>>.
>     >>> To post to this group, send email to [email protected]
>     <javascript:>
>     >>> <mailto:[email protected] <javascript:>>.
>     >>> Visit this group at http://groups.google.com/group/hobousers
>     <http://groups.google.com/group/hobousers>.
>     >>> For more options, visit https://groups.google.com/d/optout
>     <https://groups.google.com/d/optout>.
>     >
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Hobo Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at http://groups.google.com/group/hobousers.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/hobousers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to