Re: Case Insensitive

From: Holger Jakobs <holger(at)jakobs(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Case Insensitive
Date: 2019-03-28 11:01:07
Message-ID: 3ce3221c-a3f3-cad4-ce99-569902e41d31@jakobs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

Yes, you can use the data type citext

https://www.postgresql.org/docs/current/citext.html

If you don't want to do this, you will have to compare /where
lower(ename)='aaa'/

/
/

Am 28.03.19 um 09:20 schrieb Sridhar N Bamandlapally:
> 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
>
--

Holger Jakobs, Bergisch Gladbach
instant messaging: xmpp:holger(at)jakobs(dot)com
+49 178 9759012 <tel:+491789759012> oder +49 2202 817157
<tel:+492202817157>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Andy Anderson 2019-03-28 11:10:41 Re: Case Insensitive
Previous Message Steve Atkins 2019-03-28 09:30:21 Re: Case Insensitive

Browse pgsql-general by date

  From Date Subject
Next Message Andy Anderson 2019-03-28 11:10:41 Re: Case Insensitive
Previous Message Prakash Ramakrishnan 2019-03-28 10:20:55 Re: plctl extension issue postgresql 11.2