Re: Case Insensitive

Поиск
Список
Период
Сортировка
От Shreeyansh Dba
Тема Re: Case Insensitive
Дата
Msg-id CAGDYbUNQOOwnYDFGCzWvbZ1qqrnTe9QMBO+AtEdGmcNKZy4cRg@mail.gmail.com
обсуждение исходный текст
Ответ на Case Insensitive  (Sridhar N Bamandlapally <sridhar.bn1@gmail.com>)
Список pgsql-general
Hi Sridhar,

There are a few workarounds available, hope this will help you.

1) Use the citext extension
2) Use ILIKE instead of LIKE
3) Use Postgres lower() function
4) Add an index on lower(ename)

Thanks & Regards,
Shreeyansh DBA Team
www.shreeyansh.com


On Thu, Mar 28, 2019 at 1:50 PM Sridhar N Bamandlapally <sridhar.bn1@gmail.com> wrote:
Hi PG-General and Pgsql-Admin

Can we achieve CASE INSENSITIVE in PostgreSQL?

I mean, need below way

postgres=# select * from emp;
 eid | ename
-----+-------
   1 | aaa
   2 | AAA
(2 rows)


postgres=# select * from emp where ename='aaa';
 eid | ename
-----+-------
   1 | aaa
   2 | AAA
(2 rows)
--above result is just an manual made example only


Thanks
Sridhar

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: plctl extension issue postgresql 11.2
Следующее
От: Prakash Ramakrishnan
Дата:
Сообщение: Re: plctl extension issue postgresql 11.2