Re: case insensitive search

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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


[Index of Archives]     [Postgresql General]     [Postgresql Admin]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Backpacking]     [Postgresql Jobs]

  Powered by Linux