pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dan Langille <dan@langille.org>
To: Jordan Reiter <jordan@breezing.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Case Sensitive "WHERE" Clauses?
Date: Thu, 26 Sep 2002 17:08:18 -0400 (EDT)
Message-ID: <20020926165736.J30730-100000@m20.unixathome.org> (raw)
In-Reply-To: <a05100312b9b8f9c321b3@[63.172.201.5]>

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)




view thread (13+ messages)  latest in thread

Message-ID: <20020926165736.J30730-100000@m20.unixathome.org>
Permalink:  ../20020926165736.J30730-100000@m20.unixathome.org/
Also on:    postgresql.org/message-id/20020926165736.J30730-100000@m20.unixathome.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: dan@langille.org, jordan@breezing.com
  Subject: Re: Case Sensitive "WHERE" Clauses?
  In-Reply-To: <20020926165736.J30730-100000@m20.unixathome.org>
  References: <a05100312b9b8f9c321b3@[63.172.201.5]> <20020926165736.J30730-100000@m20.unixathome.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox