pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedRe[2]: [SQL] How to Make Case InSensitive???
2+ messages / 2 participants
[nested] [flat]
* Re[2]: [SQL] How to Make Case InSensitive???
@ 1998-09-16 14:14 Sferacarta Software <sferac@bo.nettuno.it>
1 sibling, 0 replies; 2+ messages in thread
From: Sferacarta Software @ 1998-09-16 14:14 UTC (permalink / raw)
To: Marcio Macedo <marciom@conectiva.com.br>; David Hartwig <daveh@insightdist.com>; Barracuda <cuda_fx@yahoo.com>; pgsql-sql@postgresql.org, "S.Ramaswamy" <srswamy@giasdl01.vsnl.net.in>
Hello Barracuda,
mercoledì, 16 settembre 98, you wrote:
B> thank you for this tip! don't know what the ^ or the $ is used for
regular expression operators ^ stand for first character and $ stand
for last character:
~* '^india$'
matches India
india
INDIA
but not Indiana
New India
>>
B> but the ~* and the \do helped me out a great deal. No info on this in
B> any documentation.
Take a look at PostgreSQL User's Guide, Chapter 5, there's some
information about PostgreSQL operators.
B> Charles
B> ---David Hartwig <daveh@insightdist.com> wrote:
>>
>>
>>
>> Marcio Macedo wrote:
>>
>> > Hey...
>> >
>> > How does this " ~* " operator works ?!?!?!
>> >
>> > David Hartwig wrote:
>> > >
>> > >
>> > > SELECT * FROM series WHERE upper(NAME) = 'INDIA'
>> > > or
>> > > SELECT * FROM series WHERE NAME ~* '^india$'
>>
>> >
>>
>> I don't use it myself, but it is a case insensitive regular expression
>> match operator. "~' is the case sensitive operator. Do "\do" in
>> psql to see all the operators.
>>
>>
>>
B> _________________________________________________________
B> DO YOU YAHOO!?
B> Get your free @yahoo.com address at http://mail.yahoo.com
Jose'
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re[2]: [SQL] How to Make Case InSensitive???
@ 1998-09-16 14:42 Herouth Maoz <herouth@oumail.openu.ac.il>
1 sibling, 0 replies; 2+ messages in thread
From: Herouth Maoz @ 1998-09-16 14:42 UTC (permalink / raw)
To: pgsql-sql
At 16:14 +0200 on 16/9/98, Sferacarta Software wrote:
> regular expression operators ^ stand for first character and $ stand
> for last character:
>
> ~* '^india$'
>
> matches India
> india
> INDIA
>
> but not Indiana
> New India
Another way to think of it is like this:
'india' is eqivalent to "contains 'india'"
'^india' is eqivalent to "starts with 'india'"
'india$' is eqivalent to "ends with 'india'"
'^india$' is eqivalent to "is exactly 'india'"
Herouth
--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~1998-09-16 14:42 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-09-16 14:14 ` Sferacarta Software <sferac@bo.nettuno.it>
1998-09-16 14:42 ` Herouth Maoz <herouth@oumail.openu.ac.il>
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