From: | Sameer Kumar <sameer(dot)kumar(at)ashnik(dot)com> |
---|---|
To: | Sridhar N Bamandlapally <sridhar(dot)bn1(at)gmail(dot)com> |
Cc: | PostgreSQL General Discussion Forum <pgsql-general(at)postgresql(dot)org>, pgsql-admin <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Case Insensitive |
Date: | 2019-03-28 08:23:52 |
Message-ID: | CADp-Sm4RWjbFQix1_XH7hstj6FY-EZj-f2veSgR_Z7Ut=tdDEA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-general |
On Thu, 28 Mar, 2019, 4:20 PM Sridhar N Bamandlapally, <
sridhar(dot)bn1(at)gmail(dot)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
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Ben Madin | 2019-03-28 08:26:30 | Re: Case Insensitive |
Previous Message | Sridhar N Bamandlapally | 2019-03-28 08:20:07 | Case Insensitive |
From | Date | Subject | |
---|---|---|---|
Next Message | Ben Madin | 2019-03-28 08:26:30 | Re: Case Insensitive |
Previous Message | Sridhar N Bamandlapally | 2019-03-28 08:20:07 | Case Insensitive |