Mention CITEXT in the FAQ
Quick patch to mention CITEXT in the parts of the FAQ that discuss
case-insensitive comparisons.
Best,
David
Attachments:
citext_faq.patchapplication/octet-stream; name=citext_faq.patch; x-unix-mode=0600Download
rgIndex: doc/src/FAQ/FAQ.html
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/FAQ/FAQ.html,v
retrieving revision 1.421
diff -u -w -r1.421 FAQ.html
--- doc/src/FAQ/FAQ.html 1 Jan 2009 17:23:33 -0000 1.421
+++ doc/src/FAQ/FAQ.html 8 Jan 2009 18:02:52 -0000
@@ -815,8 +815,10 @@
<LI>The search string can not start with a character class,
e.g. [a-e].</LI>
<LI>Case-insensitive searches such as <SMALL>ILIKE</SMALL> and
- <I>~*</I> do not utilize indexes. Instead, use expression
- indexes, which are described in section <a href="#item4.8">4.8</a>.</LI>
+ <I>~*</I> do not utilize indexes on core PostgreSQL string types. Instead,
+ use the <I>contrib/citext</I> case-insensitive text type or expression
+ indexes, which are described in section
+ <a href="#item4.8">4.8</a>.</LI>
<LI>The default <I>C</I> locale must be used during
<i>initdb</i> because it is not possible to know the next-greatest
character in a non-C locale. You can create a special
@@ -840,8 +842,14 @@
case-insensitive variant of <SMALL>LIKE</SMALL> is called
<SMALL>ILIKE</SMALL>.</P>
- <P>Case-insensitive equality comparisons are normally expressed
- as:</P>
+ <P>The simplest way to ensure transparent case-insensitive comparisons of
+ values is to tse the <I>contrib/citext</I> case-insensitive data type,
+ which ensures that <B>all</B> comparisons are case-insensitive. It also
+ allows you to easily create case-insentitive <SMALL>UNIQUE</SMALL> primary
+ key constraints.</p>
+
+ <P>If <I>contrib/citext</i> isn't an option, Case-insensitive equality
+ comparisons are normally expressed as:</P>
<PRE>
SELECT *
FROM tab
David E. Wheeler wrote:
Quick patch to mention CITEXT in the parts of the FAQ that discuss
case-insensitive comparisons.
I think it is too early to mention /contrib/citext in the FAQ because
8.4 is not released yet.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
On Feb 6, 2009, at 9:12 AM, Bruce Momjian wrote:
Quick patch to mention CITEXT in the parts of the FAQ that discuss
case-insensitive comparisons.I think it is too early to mention /contrib/citext in the FAQ because
8.4 is not released yet.
Oh, is the FAQ on the site built from CVS tip? Is there not a branch
for 8.3 from which it's built?
Best,
David
David E. Wheeler wrote:
On Feb 6, 2009, at 9:12 AM, Bruce Momjian wrote:
Quick patch to mention CITEXT in the parts of the FAQ that discuss
case-insensitive comparisons.I think it is too early to mention /contrib/citext in the FAQ because
8.4 is not released yet.Oh, is the FAQ on the site built from CVS tip? Is there not a branch
for 8.3 from which it's built?
There are FAQ's in each branch, but the one that is put on the web site
is from CVS HEAD.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
On Feb 6, 2009, at 9:33 AM, Bruce Momjian wrote:
Oh, is the FAQ on the site built from CVS tip? Is there not a branch
for 8.3 from which it's built?There are FAQ's in each branch, but the one that is put on the web
site
is from CVS HEAD.
Oh. That seems kind of odd…can you hang onto the patch until 8.4 is
released, then? This must happen all the time, no?
Best,
David
On Feb 6, 2009, at 9:12 AM, Bruce Momjian wrote:
Quick patch to mention CITEXT in the parts of the FAQ that discuss
case-insensitive comparisons.I think it is too early to mention /contrib/citext in the FAQ because
8.4 is not released yet.
Oh, is the FAQ on the site built from CVS tip? Is there not a branch
for 8.3 from which it's built?
Best,
David
David E. Wheeler wrote:
On Feb 6, 2009, at 9:33 AM, Bruce Momjian wrote:
Oh, is the FAQ on the site built from CVS tip? Is there not a branch
for 8.3 from which it's built?There are FAQ's in each branch, but the one that is put on the web
site
is from CVS HEAD.Oh. That seems kind of odd?can you hang onto the patch until 8.4 is
released, then? This must happen all the time, no?
OK, I will hang on to it, but I will have to mention it is only in 8.4
too.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
On Feb 6, 2009, at 9:43 AM, Bruce Momjian wrote:
Oh. That seems kind of odd?can you hang onto the patch until 8.4 is
released, then? This must happen all the time, no?OK, I will hang on to it, but I will have to mention it is only in 8.4
too.
Ah, yeah, I didn't put that in the patch…
Thanks!
David
On Feb 6, 2009, at 10:54 AM, David E. Wheeler wrote:
On Feb 6, 2009, at 9:43 AM, Bruce Momjian wrote:
Oh. That seems kind of odd?can you hang onto the patch until 8.4 is
released, then? This must happen all the time, no?OK, I will hang on to it, but I will have to mention it is only in
8.4
too.Ah, yeah, I didn't put that in the patch…
Just a reminder, Bruce, to add the CITEXT bit to the FAQ when 8.4 is
released. Is that supposed to be today?
Thanks,
David
Attachments:
citext_faq.patchapplication/octet-stream; name=citext_faq.patch; x-unix-mode=0600Download
rgIndex: doc/src/FAQ/FAQ.html
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/FAQ/FAQ.html,v
retrieving revision 1.421
diff -u -w -r1.421 FAQ.html
--- doc/src/FAQ/FAQ.html 1 Jan 2009 17:23:33 -0000 1.421
+++ doc/src/FAQ/FAQ.html 8 Jan 2009 18:02:52 -0000
@@ -815,8 +815,10 @@
<LI>The search string can not start with a character class,
e.g. [a-e].</LI>
<LI>Case-insensitive searches such as <SMALL>ILIKE</SMALL> and
- <I>~*</I> do not utilize indexes. Instead, use expression
- indexes, which are described in section <a href="#item4.8">4.8</a>.</LI>
+ <I>~*</I> do not utilize indexes on core PostgreSQL string types. Instead,
+ use the <I>contrib/citext</I> case-insensitive text type or expression
+ indexes, which are described in section
+ <a href="#item4.8">4.8</a>.</LI>
<LI>The default <I>C</I> locale must be used during
<i>initdb</i> because it is not possible to know the next-greatest
character in a non-C locale. You can create a special
@@ -840,8 +842,14 @@
case-insensitive variant of <SMALL>LIKE</SMALL> is called
<SMALL>ILIKE</SMALL>.</P>
- <P>Case-insensitive equality comparisons are normally expressed
- as:</P>
+ <P>The simplest way to ensure transparent case-insensitive comparisons of
+ values is to tse the <I>contrib/citext</I> case-insensitive data type,
+ which ensures that <B>all</B> comparisons are case-insensitive. It also
+ allows you to easily create case-insentitive <SMALL>UNIQUE</SMALL> primary
+ key constraints.</p>
+
+ <P>If <I>contrib/citext</i> isn't an option, Case-insensitive equality
+ comparisons are normally expressed as:</P>
<PRE>
SELECT *
FROM tab
"David E. Wheeler" <david@kineticode.com> writes:
Just a reminder, Bruce, to add the CITEXT bit to the FAQ when 8.4 is
released. Is that supposed to be today?
The FAQ is on the wiki now ... fix it yourself.
regards, tom lane
On Jul 1, 2009, at 9:07 AM, Tom Lane wrote:
Just a reminder, Bruce, to add the CITEXT bit to the FAQ when 8.4 is
released. Is that supposed to be today?The FAQ is on the wiki now ... fix it yourself.
It is? When did that happen?
Best,
David
On Wed, 2009-07-01 at 09:15 -0700, David E. Wheeler wrote:
On Jul 1, 2009, at 9:07 AM, Tom Lane wrote:
Just a reminder, Bruce, to add the CITEXT bit to the FAQ when 8.4 is
released. Is that supposed to be today?The FAQ is on the wiki now ... fix it yourself.
It is? When did that happen?
Quite some time ago.
Joshua D. Drake
Best,
David
--
PostgreSQL - XMPP: jdrake@jabber.postgresql.org
Consulting, Development, Support, Training
503-667-4564 - http://www.commandprompt.com/
The PostgreSQL Company, serving since 1997
"David E. Wheeler" <david@kineticode.com> writes:
On Jul 1, 2009, at 9:07 AM, Tom Lane wrote:
The FAQ is on the wiki now ... fix it yourself.
It is? When did that happen?
http://archives.postgresql.org/pgsql-committers/2009-04/msg00111.php
regards, tom lane
On Jul 1, 2009, at 9:27 AM, Tom Lane wrote:
It is? When did that happen?
http://archives.postgresql.org/pgsql-committers/2009-04/msg00111.php
Thanks. Change added to the wiki.
Best,
David