Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 173B0476A55 for ; Thu, 26 Sep 2002 19:10:00 -0400 (EDT) Received: from cooee.squiz.net (cooee.cybersydney.com.au [203.25.173.1]) by postgresql.org (Postfix) with SMTP id 828364766FF for ; Thu, 26 Sep 2002 19:09:57 -0400 (EDT) Received: (qmail 11565 invoked by uid 509); 26 Sep 2002 23:09:56 -0000 Received: from csmith@squiz.net by cooee.squiz.net by uid 0 with qmail-scanner-1.14 ( Clear:. Processed in 0.026129 secs); 26 Sep 2002 23:09:56 -0000 Received: from pc149.cybersydney.com.au (HELO avenger.squiz.net) (203.25.173.149) by cooee.cybersydney.com.au with SMTP; 26 Sep 2002 23:09:55 -0000 Message-Id: <5.1.0.14.0.20020927090709.02f125d0@cooee.squiz.net> X-Sender: csmith@cooee.squiz.net X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Fri, 27 Sep 2002 09:14:04 +1000 To: Ian Barwick , pgsql-sql@postgresql.org From: Chris Subject: Re: Case Sensitive "WHERE" Clauses? In-Reply-To: <200209270100.14503.barwick@gmx.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/346 X-Sequence-Number: 9623 >On Thursday 26 September 2002 19:54, Jordan Reiter wrote: > > Are string comparisons in postgresql case sensitive? > >Yes, unless you specify otherwise. > >Are you sure you are using the right database? I can >reproduce similar results, but only like this: You're using MySQL in these examples .. not Postgres :) (FYI - Just tried this with 7.3beta and I got the same results as everyone else .. it is case sensitive). Chris. >mysql> create temporary table foo (ch char(2), vc varchar(2)); >Query OK, 0 rows affected (0.12 sec) > >mysql> insert into foo values ('aa','AA'); >Query OK, 1 row affected (0.02 sec) > >mysql> select * from foo where ch = 'aa'; >+------+------+ >| ch | vc | >+------+------+ >| aa | AA | >+------+------+ >1 row in set (0.01 sec) > >mysql> select * from foo where ch = 'AA'; >+------+------+ >| ch | vc | >+------+------+ >| aa | AA | >+------+------+ >1 row in set (0.00 sec) > >mysql> select * from foo where vc = 'aa'; >+------+------+ >| ch | vc | >+------+------+ >| aa | AA | >+------+------+ >1 row in set (0.00 sec) >