Re: case insensitive search

Поиск
Список
Период
Сортировка
От knut.suebert@web.de
Тема Re: case insensitive search
Дата
Msg-id 20020315173341.GC6266@web.de
обсуждение исходный текст
Ответ на Re: case insensitive search  (Gurudutt <guru@indvalley.com>)
Список pgsql-php
Gurudutt schrieb:
> Hello arun,
>
> ak>         how to do a case insensitive search on postgresql database. i will
> ak> enter a keyword in text field and it has to search for that keyword in
> ak> keywords field of table and should be case insensitive.
>
> why don't you use "ilike" to search for the pattern in the database.

or POSIX:

4.6.2. POSIX Regular Expressions

Table 4-10. Regular Expression Match Operators

Operator Description            Example
~     regex, case sensitive        'thomas' ~ '.*thomas.*'
~*     regex, case insensitive    'thomas' ~* '.*Thomas.*'
!~     not regex, case sensitive    'thomas' !~ '.*Thomas.*'
!~*     not regex, case insensitive    'thomas' !~* '.*vadim.*'

G,
K

В списке pgsql-php по дате отправления:

Предыдущее
От: timothy_maguire@hartehanks.com
Дата:
Сообщение: Re: case insensitive search
Следующее
От: Frank Joerdens
Дата:
Сообщение: pg_errormessage within a transaction block (doesn't work as expected)