You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by Scott Eade <se...@backstagetech.com.au> on 2003/12/01 03:11:02 UTC
Re: Case sensitivity of LIKE
Scott Eade wrote:
> I have recently converted an application that uses Torque from MySQL
> to PostgreSQL. It has just become evident that LIKE statements behave
> differently between these two thus:
>
> MySQL - LIKE is case insensitive.
> PostgreSQL - LIKE is case sensitive, for case insensitive you can
> use ILIKE
>
> I have looked into Oracle and for it you need to go:
>
> like UPPER(colname) like 'ABC' - and provide a functional index to
> make it work efficiently.
>
> I haven't looked at any further databases, but three variations for
> three systems is not a very good start.
>
> I guess I can hack it for PostgreSQL by just using my own " ILIKE"
> constant instead of Criteria.LIKE, but I am wondering if this
> something that Torque should perhaps cater for somehow?
Are there any objections to me adding ILIKE and NOT_ILIKE to SqlEnum so
that I can use these in my application? If there are strong objections
against this the alternative would be to change the access of the
SqlEnum constructor to protected so that I can extend it to achieve the
same result.
Scott
--
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org