pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Holger Jakobs <holger@jakobs.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Case Insensitive
Date: Thu, 28 Mar 2019 12:01:07 +0100
Message-ID: <3ce3221c-a3f3-cad4-ce99-569902e41d31@jakobs.com> (raw)
In-Reply-To: <CAGuFTBU1fACZWYdVwU-HiBJWAt2QFRa9fkB+SovmVMoUjVbekw@mail.gmail.com>
References: <CAGuFTBU1fACZWYdVwU-HiBJWAt2QFRa9fkB+SovmVMoUjVbekw@mail.gmail.com>

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@jakobs.com
+49 178 9759012 <tel:+491789759012> oder +49 2202 817157
<tel:+492202817157>

view thread (19+ messages)  latest in thread

Message-ID: <3ce3221c-a3f3-cad4-ce99-569902e41d31@jakobs.com>
Permalink:  ../3ce3221c-a3f3-cad4-ce99-569902e41d31@jakobs.com/
Also on:    postgresql.org/message-id/3ce3221c-a3f3-cad4-ce99-569902e41d31@jakobs.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: holger@jakobs.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Case Insensitive
  In-Reply-To: <3ce3221c-a3f3-cad4-ce99-569902e41d31@jakobs.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox