pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedCase in-sensitive searches
5+ messages / 5 participants
[nested] [flat]
* Case in-sensitive searches
@ 1998-05-18 21:04 Mike Lemler <coronach@datacruz.com>
0 siblings, 1 reply; 5+ messages in thread
From: coronach@datacruz.com @ 1998-05-18 21:04 UTC (permalink / raw)
To: pgsql-sql
Is there a paramater to a select statement that one can issue to make the
search case insesitive? Thanks
Michael
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [SQL] Case in-sensitive searches
@ 1998-05-19 06:59 Jerome Knobl <jknobl@mandanet.ch>
parent: Mike Lemler <coronach@datacruz.com>
0 siblings, 2 replies; 5+ messages in thread
From: Jerome Knobl @ 1998-05-19 06:59 UTC (permalink / raw)
To: Mike Lemler <coronach@datacruz.com>; +Cc: pgsql-sql
Hi,
I found an inellegant sollution. You can put every character in uppercase
like that :
Select * From table_membres where upper(nom) like upper('myname');
JK
Mike Lemler wrote:
> Is there a paramater to a select statement that one can issue to make the
> search case insesitive? Thanks
>
> Michael
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [SQL] Case in-sensitive searches
@ 1998-05-19 07:54 Marin D <marin@iclub.techno-link.com>
parent: Jerome Knobl <jknobl@mandanet.ch>
1 sibling, 1 reply; 5+ messages in thread
From: Marin D @ 1998-05-19 07:54 UTC (permalink / raw)
To: Jerome Knobl <jknobl@mandanet.ch>; +Cc: Mike Lemler <coronach@datacruz.com>; pgsql-sql
upper()/lower() are defined only for text fields. How to deal with charN ?
Thanx for the attention!
Marin
-= Why do we need gates in a world without fences? =-
On Tue, 19 May 1998, Jerome Knobl wrote:
> Hi,
>
> I found an inellegant sollution. You can put every character in uppercase
> like that :
>
> Select * From table_membres where upper(nom) like upper('myname');
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [SQL] Case in-sensitive searches
@ 1998-05-19 12:31 Jose' Soares Da Silva <sferac@bo.nettuno.it>
parent: Marin D <marin@iclub.techno-link.com>
0 siblings, 0 replies; 5+ messages in thread
From: Jose' Soares Da Silva @ 1998-05-19 12:31 UTC (permalink / raw)
To: Marin D <marin@iclub.techno-link.com>; +Cc: Jerome Knobl <jknobl@mandanet.ch>; Mike Lemler <coronach@datacruz.com>; pgsql-sql; sferac@nettuno.it
On Tue, 19 May 1998, Marin D wrote:
>
> upper()/lower() are defined only for text fields. How to deal with charN ?
>
version 6.3:
prova=> create table a ( var varchar(20), ch char(30));
CREATE
prova=> insert into a values ('nome','pippo');
INSERT 76394 1
prova=> select * from a;
var |ch
----+------------------------------
nome|pippo
(1 row)
prova=> select upper(var), upper(ch) from a;
upper|upper
-----+------------------------------
NOME |PIPPO
(1 row)
Jose'
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [SQL] Case in-sensitive searches
@ 1998-05-20 15:47 Eugene Selkov Jr. <selkovjr@mcs.anl.gov>
parent: Jerome Knobl <jknobl@mandanet.ch>
1 sibling, 0 replies; 5+ messages in thread
From: Eugene Selkov Jr. @ 1998-05-20 15:47 UTC (permalink / raw)
To: Jerome Knobl <jknobl@mandanet.ch>; +Cc: Mike Lemler <coronach@datacruz.com>; pgsql-sql
Jerome Knobl wrote:
>
> Hi,
>
> I found an inellegant sollution. You can put every character in uppercase
> like that :
>
> Select * From table_membres where upper(nom) like upper('myname');
>
I use a much less elegant solution that works extremely well for me. I
add a copy of the column to the table and fold it uppercase before I
load the table. I also do some additional processing in it, in order to
eliminate things that may interfere with indexing, such as accents in
European characters. The application then decides whether to search in
the original or in the processed copy of the column, but the original
data are always returned to the user.
--Gene
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~1998-05-20 15:47 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-05-18 21:04 Case in-sensitive searches Mike Lemler <coronach@datacruz.com>
1998-05-19 06:59 ` Jerome Knobl <jknobl@mandanet.ch>
1998-05-19 07:54 ` Marin D <marin@iclub.techno-link.com>
1998-05-19 12:31 ` Jose' Soares Da Silva <sferac@bo.nettuno.it>
1998-05-20 15:47 ` Eugene Selkov Jr. <selkovjr@mcs.anl.gov>
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