Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id C68A4476389 for ; Fri, 27 Sep 2002 03:24:26 -0400 (EDT) Received: from post.webmailer.de (natwar.webmailer.de [192.67.198.70]) by postgresql.org (Postfix) with ESMTP id 98F17475F82 for ; Fri, 27 Sep 2002 03:24:25 -0400 (EDT) Received: from ianb.local (pD9E0EC7D.dip.t-dialin.net [217.224.236.125]) by post.webmailer.de (8.9.3/8.8.7) with ESMTP id JAA10349; Fri, 27 Sep 2002 09:24:15 +0200 (MEST) Content-Type: text/plain; charset="iso-8859-1" From: Ian Barwick To: Tom Lane Subject: Re: Case Sensitive "WHERE" Clauses? Date: Fri, 27 Sep 2002 09:25:36 +0200 X-Mailer: KMail [version 1.4] Cc: pgsql-sql@postgresql.org References: <200209270133.35024.barwick@gmx.net> <20455.1033096783@sss.pgh.pa.us> In-Reply-To: <20455.1033096783@sss.pgh.pa.us> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200209270925.36160.barwick@gmx.net> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/352 X-Sequence-Number: 9629 On Friday 27 September 2002 05:19, Tom Lane wrote: > Ian Barwick writes: > > Anyone know what the ANSI standard is? I don`t recall any other > > database apart from MySQL which default to case-insensitive > > CHAR or VARCHAR columns. > > I believe the spec has a notion of a "collation attribute" attached > to character-type columns. You could define a collation that makes > comparisons case insensitive and then mark selected columns that way. > We don't have anything like that yet, though Tatsuo has been heard > muttering about how to make it happen ... For reference, MySQL treats CHAR and VARCHAR columns as=20 case insensitive by default; to be treated as case sensitive, fields must be defined or redefined as CHAR BINARY / VARCHAR BINARY. Personally I prefer handling case (in)sensitivity explicitly in the WHERE= =20 clause or at application level, though if the standard allows it and it's= =20 optional, enabling specific columns to be case insensitive in comparisions can only be a Good Thing (TM). Ian Barwick barwick@gmx.net