Re: [HACKERS] PATCH: CITEXT 2.0 v2

2008-07-09 Thread David E. Wheeler
On Jul 7, 2008, at 12:06, David E. Wheeler wrote: I understand it but there is parallel project which should solve this problem completely I guess in close future (2-3years). Afterward this module will be obsolete and it will takes times to remove it from contrib. It seems to me that have

Re: [HACKERS] PATCH: CITEXT 2.0 v2

2008-07-08 Thread Martijn van Oosterhout
On Mon, Jul 07, 2008 at 12:06:08PM -0700, David E. Wheeler wrote: I guess that'd be the reason to keep it on pgFoundry, but I have two comments: * 2-3 years is a *long* time in Internet time. There have been patches over the years, but they tend not to get looked at. Recently someone

Re: [HACKERS] PATCH: CITEXT 2.0 v2

2008-07-08 Thread Zdenek Kotala
Martijn van Oosterhout napsal(a): On Mon, Jul 07, 2008 at 12:06:08PM -0700, David E. Wheeler wrote: I guess that'd be the reason to keep it on pgFoundry, but I have two comments: * 2-3 years is a *long* time in Internet time. There have been patches over the years, but they tend not to get

Re: [HACKERS] PATCH: CITEXT 2.0 v2

2008-07-07 Thread Zdenek Kotala
David E. Wheeler napsal(a): On Jun 27, 2008, at 18:22, David E. Wheeler wrote: Please find attached a patch adding a locale-aware, case-insensitive text type, called citext, as a contrib module. Here is a new version of the patch, with the following changes: * Fixed formatting to be more

Re: [HACKERS] PATCH: CITEXT 2.0 v2

2008-07-07 Thread Andrew Dunstan
Zdenek Kotala wrote: 2) contrib vs. pgFoundry There is unresolved answer if we want to have this in contrib or not. Good to mention that citext type will be obsoleted with full collation implementation in a future. I personally prefer to keep it on pgFoundry because it is temporally

Re: [HACKERS] PATCH: CITEXT 2.0 v2

2008-07-07 Thread David E. Wheeler
On Jul 7, 2008, at 07:41, Zdenek Kotala wrote: However, It seems to me that code is ok now (exclude citex_eq). I think there two open problems/questions: 1) regression test - a) I think that regresion is not correct. It depends on en_US locale, but it uses characters which is not in

Re: [HACKERS] PATCH: CITEXT 2.0 v2

2008-07-07 Thread David E. Wheeler
On Jul 7, 2008, at 08:01, Andrew Dunstan wrote: What does still bother me is its performance. I'd like to know if any measurement has been done of using citext vs. a functional index on lower(foo). That's a good question. I can whip up a quick test by populating a column full of data and

Re: [HACKERS] PATCH: CITEXT 2.0 v2

2008-07-07 Thread Zdenek Kotala
David E. Wheeler napsal(a): On Jul 7, 2008, at 07:41, Zdenek Kotala wrote: However, It seems to me that code is ok now (exclude citex_eq). I think there two open problems/questions: 1) regression test - a) I think that regresion is not correct. It depends on en_US locale, but it uses

Re: [HACKERS] PATCH: CITEXT 2.0 v2

2008-07-07 Thread Zdenek Kotala
Andrew Dunstan napsal(a): Zdenek Kotala wrote: 2) contrib vs. pgFoundry There is unresolved answer if we want to have this in contrib or not. Good to mention that citext type will be obsoleted with full collation implementation in a future. I personally prefer to keep it on pgFoundry

Re: [HACKERS] PATCH: CITEXT 2.0 v2

2008-07-07 Thread David E. Wheeler
On Jul 7, 2008, at 11:54, Zdenek Kotala wrote: Hmm, it is complex area and I'm not sure if anybody on planet know correct answer :-). I think that best approach is to keep it as is and when a problem occur then it will be fixed. Regression tests are really important, though. b) pgTap is

Re: [HACKERS] PATCH: CITEXT 2.0 v2

2008-07-07 Thread Pavel Stehule
2008/7/7 Zdenek Kotala [EMAIL PROTECTED]: David E. Wheeler napsal(a): On Jul 7, 2008, at 07:41, Zdenek Kotala wrote: However, It seems to me that code is ok now (exclude citex_eq). I think there two open problems/questions: 1) regression test - a) I think that regresion is not correct.

Re: [HACKERS] PATCH: CITEXT 2.0 v2

2008-07-07 Thread David E. Wheeler
On Jul 7, 2008, at 12:10, Pavel Stehule wrote: Maybe we can have some locale test outside our regress tests - I think that would be useful. Best, David -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] PATCH: CITEXT 2.0 v2

2008-07-07 Thread David E. Wheeler
On Jul 7, 2008, at 08:01, Andrew Dunstan wrote: What does still bother me is its performance. I'd like to know if any measurement has been done of using citext vs. a functional index on lower(foo). Okay, here's a start. The attached script inserts random strings of 1-10 space-delimited

Re: [HACKERS] PATCH: CITEXT 2.0 v2

2008-07-07 Thread David E. Wheeler
And here is the script. D'oh! Thanks, David try.sql Description: Binary data On Jul 7, 2008, at 16:24, David E. Wheeler wrote: On Jul 7, 2008, at 08:01, Andrew Dunstan wrote: What does still bother me is its performance. I'd like to know if any measurement has been done of using

Re: [HACKERS] PATCH: CITEXT 2.0 v2

2008-07-07 Thread David E. Wheeler
No, *really* Sheesh, sorry. David try.sql Description: Binary data On Jul 7, 2008, at 16:26, David E. Wheeler wrote: And here is the script. D'oh! Thanks, David try.sql On Jul 7, 2008, at 16:24, David E. Wheeler wrote: On Jul 7, 2008, at 08:01, Andrew Dunstan wrote: What does

Re: [HACKERS] PATCH: CITEXT 2.0 v2

2008-07-07 Thread David E. Wheeler
Thanks to help from RhodiumToad on IRC, I got some things improved here: On Jul 7, 2008, at 16:24, David E. Wheeler wrote: So for some reason, after adding the indexes, the queries against the CITEXT column aren't using them. Furthermore, the `lower(text) LIKE lower(?)` query isn't using