pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Data Search
2+ messages / 2 participants
[nested] [flat]

* Data Search
@ 1999-12-29 15:06  Robert Hiltibidal <rob@y2k.state.il.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Robert Hiltibidal @ 1999-12-29 15:06 UTC (permalink / raw)
  To: pgsql-interfaces

Howdy,

I'm try to do a search on users from one database against a table in another.

Both databases have a mixture of upper and lowercase characters. Is there a
way to tell postgres to consider a match if the absolute character is the
same regardless of case?

Ex 
'ROB' should also produce a hit if postgres encouters 'rob'

Thanks,

-Rob




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [INTERFACES] Data Search
@ 1999-12-29 16:02  Ed Loehr <ELOEHR@austin.rr.com>
  parent: Robert Hiltibidal <rob@y2k.state.il.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Ed Loehr @ 1999-12-29 16:02 UTC (permalink / raw)
  To: Robert Hiltibidal <rob@y2k.state.il.us>; +Cc: pgsql-interfaces

> Both databases have a mixture of upper and lowercase characters. Is there a
> way to tell postgres to consider a match if the absolute character is the
> same regardless of case?
>
> Ex
> 'ROB' should also produce a hit if postgres encouters 'rob'
>

http://www.postgresql.org/docs/postgres/functions2470.htm

db=> create table t(s varchar);
CREATE
db=> insert into t values ('Joe');
INSERT 365513 1
db=> insert into t values ('JoE');
INSERT 365514 1
db=> insert into t values ('JOE');
INSERT 365515 1
db=> select * from t where s like 'joe';
s
-
(0 rows)

db=> select * from t where lower(s) like 'joe';
s
---
Joe
JoE
JOE
(3 rows)

Cheers,
Ed Loehr




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~1999-12-29 16:02 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-12-29 15:06 Data Search Robert Hiltibidal <rob@y2k.state.il.us>
1999-12-29 16:02 ` Ed Loehr <ELOEHR@austin.rr.com>

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