From: | Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | Mike Christensen <mike(at)kitchenpc(dot)com> |
Cc: | Michal Politowski <mpol(at)charybda(dot)icm(dot)edu(dot)pl>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Best way to store case-insensitive data? |
Date: | 2010-06-12 21:21:21 |
Message-ID: | AANLkTikIgghfPEv_qMQnZOqVijSk2gggbRz-efabfUgm@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
2010/6/11 Mike Christensen <mike(at)kitchenpc(dot)com>:
> Yea this is a valid point. It's very possible my design won't work
> for the long term, and at some point I'll have to store the email name
> exactly as it was entered, and allow the lookup logic to be case
> insensitive with a lowercase index. However, I think the way I have
> it now should not break any known email server heh.
Instead of mangling data when you store it, mangle it later when you
retrieve it. with a functional index on the column, you get the
comparison data stored in an index, ready to go.
Performance test the index:
create test_index on table (lower(fieldname));
versus storing the emails in lower case.
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Marlowe | 2010-06-12 21:26:01 | Re: Best way to store case-insensitive data? |
Previous Message | Adrian von Bidder | 2010-06-12 20:51:41 | Re: Best way to store case-insensitive data? |