I don't have much recent firsthand PG experience, but reading citext docs, it 
looks like exactly what you need. 

So when comparisons are done in SQL it should work (at least it works for me on 
MySQL with similar DB-side settings). On the other hand if you are using 
in-memory filtering with expressions it won't work, as in-memory comparisons 
are simple Java "equal". 

Finally there is a 'likeIgnoreCase' expression that works consistently 
in-memory and in DB (regardless of DB-side case sensitivity), as the name 
implies. 

Andrus


On Oct 30, 2012, at 2:54 PM, Garth Keesler <gar...@gdcjk.com> wrote:

> I'm converting an MS Access ADP project to Java/Postgresql/Cayenne (my first 
> and mostly for the fun of it) and am trying to figure out how to best match 
> the case insensitive string usage that is in SQL Server. I created the PG 
> database using CITEXT only where actually necessary but it doesn't seem to be 
> recognized in Cayenne. It appears that I need to replace all CITEXT columns 
> with TEXT and handle case insensitive comparisons manually. I've found a 
> couple of threads that mention this but none had any real advice on how best 
> to do it in a Cayenne environment. Lower() is frequently mentioned as the 
> usual approach but before I go down that path too far I'd appreciate a little 
> feedback from more experienced Cayenne users.
> 
> Thanx Much,
> Garth
> 

Reply via email to