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)


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Reply via email to