Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id EC2BB476F56 for ; Thu, 26 Sep 2002 17:10:20 -0400 (EDT) Received: from m20.unixathome.org (m20.unixathome.org [216.187.106.227]) by postgresql.org (Postfix) with ESMTP id 6E4B7476F7E for ; Thu, 26 Sep 2002 17:10:20 -0400 (EDT) Received: by m20.unixathome.org (Postfix, from userid 1001) id C21CF7A11; Thu, 26 Sep 2002 17:08:18 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by m20.unixathome.org (Postfix) with ESMTP id B5ABE1F03; Thu, 26 Sep 2002 17:08:18 -0400 (EDT) Date: Thu, 26 Sep 2002 17:08:18 -0400 (EDT) From: Dan Langille X-X-Sender: dan@m20.unixathome.org To: Jordan Reiter Cc: pgsql-sql@postgresql.org Subject: Re: Case Sensitive "WHERE" Clauses? In-Reply-To: Message-ID: <20020926165736.J30730-100000@m20.unixathome.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/341 X-Sequence-Number: 9618 On Thu, 26 Sep 2002, Jordan Reiter wrote: > Are string comparisons in postgresql case sensitive? Yes, AFAIK. I disagree with your comments and recommendations posted at http://www.postgresql.org/idocs/index.php?datatype-character.html because my testing shows that varying text and fixed test comparisons are both case sensitive. testing=# \d casetest Table "casetest" Column | Type | Modifiers --------+---------------+----------- name | text | city | character(10) | testing=# select * from casetest; name | city ------+------------ Dan | Ottawa (1 row) testing=# select * from casetest where name = 'Dan'; name ------ Dan (1 row) testing=# select * from casetest where name = 'dan'; name ------ (0 rows) testing=# select * from casetest where city = 'ottawa'; name | city ------+------ (0 rows)