Re: Case Insensitive

Поиск
Список
Период
Сортировка
От Sameer Kumar
Тема Re: Case Insensitive
Дата
Msg-id CADp-Sm4RWjbFQix1_XH7hstj6FY-EZj-f2veSgR_Z7Ut=tdDEA@mail.gmail.com
обсуждение исходный текст
Ответ на Case Insensitive  (Sridhar N Bamandlapally <sridhar.bn1@gmail.com>)
Ответы Re: Case Insensitive  (Ben Madin <ben@ausvet.com.au>)
Re: Case Insensitive  (Ben Madin <ben@ausvet.com.au>)
Re: Case Insensitive  (Ron <ronljohnsonjr@gmail.com>)
Список pgsql-general


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

Can we achieve CASE INSENSITIVE in PostgreSQL?

You are perhaps migrating from another RDBMS where this kind of feature is considered a feature.



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


You can write a query with upper function:

select * from emp where upper(ename)=upper('aaa');

Or you can overload the "=" operator for text arguements.



Thanks
Sridhar

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

Предыдущее
От: Sridhar N Bamandlapally
Дата:
Сообщение: Case Insensitive
Следующее
От: Ben Madin
Дата:
Сообщение: Re: Case Insensitive