Re: Case Sensitive "WHERE" Clauses?
От | Andrew Perrin |
---|---|
Тема | Re: Case Sensitive "WHERE" Clauses? |
Дата | |
Msg-id | Pine.LNX.4.21.0209261421270.11079-100000@perrin.socsci.unc.edu обсуждение исходный текст |
Ответ на | Case Sensitive "WHERE" Clauses? (Jordan Reiter <jordan@breezing.com>) |
Ответы |
Re: Case Sensitive "WHERE" Clauses?
|
Список | pgsql-sql |
No, I don't think it's supposed to be case-sensitive. In any case, whether it's supposed to be or not, it certainly isn't in practice. Solutions include: SELECT * FROM People WHERE lower(first_name)='jordan'; and: SELECT * FROM People WHERE first_name ~* 'Jordan'; ap ---------------------------------------------------------------------- Andrew J Perrin - http://www.unc.edu/~aperrin Assistant Professor of Sociology, U of North Carolina, Chapel Hill clists@perrin.socsci.unc.edu * andrew_perrin (at) unc.edu On Thu, 26 Sep 2002, Jordan Reiter wrote: > Are string comparisons in postgresql case sensitive? > > I keep on having this response: > > SELECT * > FROM People > WHERE first_name='jordan' > > Result: 0 records > > SELECT * > FROM People > WHERE first_name='Jordan' > > Result: 1 record > > I though that string matching in SQL was case-insensitive. Isn't this correct? If not, what workarounds have been usedsuccessfully before? Obviously, formatting the search string for the query is not a solution... > -- > > Jordan Reiter mailto:jordan@breezing.com > Breezing.com http://breezing.com > 1106 West Main St phone:434.295.2050 > Charlottesville, VA 22903 fax:603.843.6931 > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly >
В списке pgsql-sql по дате отправления: