Thread: Case-sensitive

Case-sensitive

From
"Alexander B."
Date:
Hi,

One developer asked me about case-sensitive, if its possible disable
Postgres not consider when using comparative functions.
Eg.:
select * from people
where upper(name) like upper('A%');

Is there any parameter that don't take in account case-sensitive, or any
other way to treat??

Thanks






_______________________________________________________
Yahoo! Mail - Sempre a melhor opção para você!
Experimente já e veja as novidades.
http://br.yahoo.com/mailbeta/tudonovo/

Re: Case-sensitive

From
Thomas Pundt
Date:
Hi,

On Thursday 25 January 2007 11:52, Alexander B. wrote:
| One developer asked me about case-sensitive, if its possible disable
| Postgres not consider when using comparative functions.
| Eg.:
| select * from people
| where upper(name) like upper('A%');
|
| Is there any parameter that don't take in account case-sensitive, or any
| other way to treat??

 name ilike 'a%';
 name ~* '^a';

For pattern matching operators you can take a look at
http://www.postgresql.org/docs/8.2/interactive/functions-matching.html

Ciao,
Thomas

--
Thomas Pundt <thomas.pundt@rp-online.de> ---- http://rp-online.de/ ----

Re: Case-sensitive

From
"Shoaib Mir"
Date:
'citext' module (http://gborg.postgresql.org/project/citext/projdisplay.php) might help you with this....

-----------
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)

On 1/25/07, Alexander B. <burbello3000@yahoo.com.br > wrote:
Hi,

One developer asked me about case-sensitive, if its possible disable
Postgres not consider when using comparative functions.
Eg.:
select * from people
where upper(name) like upper('A%');

Is there any parameter that don't take in account case-sensitive, or any
other way to treat??

Thanks






_______________________________________________________
Yahoo! Mail - Sempre a melhor opção para você!
Experimente já e veja as novidades.
http://br.yahoo.com/mailbeta/tudonovo/

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Re: Case-sensitive

From
Bruce Momjian
Date:
And there is an FAQ about this.

---------------------------------------------------------------------------

Shoaib Mir wrote:
> 'citext' module (http://gborg.postgresql.org/project/citext/projdisplay.php)
> might help you with this....
>
> -----------
> Shoaib Mir
> EnterpriseDB (www.enterprisedb.com)
>
> On 1/25/07, Alexander B. <burbello3000@yahoo.com.br> wrote:
> >
> > Hi,
> >
> > One developer asked me about case-sensitive, if its possible disable
> > Postgres not consider when using comparative functions.
> > Eg.:
> > select * from people
> > where upper(name) like upper('A%');
> >
> > Is there any parameter that don't take in account case-sensitive, or any
> > other way to treat??
> >
> > Thanks
> >
> >
> >
> >
> >
> >
> > _______________________________________________________
> > Yahoo! Mail - Sempre a melhor op??o para voc?!
> > Experimente j? e veja as novidades.
> > http://br.yahoo.com/mailbeta/tudonovo/
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 2: Don't 'kill -9' the postmaster
> >

--
  Bruce Momjian   bruce@momjian.us
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

Re: Case-sensitive

From
Bruno Wolff III
Date:
On Thu, Jan 25, 2007 at 08:52:28 -0200,
  "Alexander B." <burbello3000@yahoo.com.br> wrote:
> Hi,
>
> One developer asked me about case-sensitive, if its possible disable
> Postgres not consider when using comparative functions.
> Eg.:
> select * from people
> where upper(name) like upper('A%');
>
> Is there any parameter that don't take in account case-sensitive, or any
> other way to treat??

You can use ilike, though using upper (on the column, not the pattern) has the
advantage that you can create functional indexes that can be used to speed
things up in some cases. There is also an operator for doing case insensitive
regular expression matching.