Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pgArrayContains and case sensitivity #26

Open
aeischeid opened this issue Feb 4, 2014 · 4 comments
Open

pgArrayContains and case sensitivity #26

aeischeid opened this issue Feb 4, 2014 · 4 comments
Assignees

Comments

@aeischeid
Copy link
Contributor

wondering if there an easy way to check for pgArrayContains in a case insensitive way if it is a String[]? or if it would be easy to implement maybe

or is it best to simply store values forced into either upper or lower case and do the same with queries?

@ilopmar
Copy link
Collaborator

ilopmar commented Feb 5, 2014

Hi Aaron,

We've been digging around and we have found the postgresql type citext: http://www.postgresql.org/docs/9.1/static/citext.html

I'm going to do some tests but I think I can create a new HibernateType that uses an array of citext instead of array of varchar.

Regards, Iván.

@ilopmar ilopmar self-assigned this Feb 6, 2014
@ilopmar
Copy link
Collaborator

ilopmar commented Feb 14, 2014

Hi @aeischeid,

I've been working on citext support and I have it almost working. You can check the WIP version in this branch: https://github.com/kaleidos/grails-postgresql-extensions/tree/array_citext

Currently it's possible to store Strings in citext columns but there is a problem when retrieving from the db and casting back to String.

Regards, Iván.

@aeischeid
Copy link
Contributor Author

Sweet! I will try to give it a look later today.

@ilopmar
Copy link
Collaborator

ilopmar commented Jul 27, 2014

Hi @aeischeid,

I've been doing some changes to support citext and you can see all of them in this PR #45.

Regards, Iván.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants