Re: PATCH: CITEXT 2.0 v4

Michael Paesold <mpaesold@gmx.at>

From: Michael Paesold <mpaesold@gmx.at>
To: David E. Wheeler <david@kineticode.com>
Cc: Robert Treat <xzilla@users.sourceforge.net>, pgsql-hackers@postgresql.org
Date: 2008-07-17T10:45:42Z
Lists: pgsql-hackers
Am 16.07.2008 um 20:38 schrieb David E. Wheeler:
>
> The trouble is that, right now:
>
> template1=# select regexp_replace( 'fxx'::citext, 'X'::citext, 'o');
> regexp_replace
> ----------------
> fxx
> (1 row)
>
> So there's an inconsistency there. I don't know how to make that  
> work case-insensitively.

Wouldn't it be possible to create a variant of regexp_replace, i.e.  
regexp_replace(citext,citext,text), which would again lower-case the  
first two arguments before passing the input to  
regexp_replace(text,text,text)?

Best Regards
Michael Paesold