From: Herouth Maoz <herouth@oumail.openu.ac.il>
To: Remigiusz Sokolowski <rems@gdansk.sprint.pl>
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] Newbie questions
Date: Tue, 15 Dec 1998 16:29:09 +0200
Message-ID: <l03110710b29c1f4a7f9f@[147.233.159.109]> (raw)
In-Reply-To: <Pine.GS4.4.02A.9812151416560.14379-100000@netra.gdansk.sprint.pl>
References: <l0311070eb29c0a1081e5@[147.233.159.109]>
At 15:41 +0200 on 15/12/98, Remigiusz Sokolowski wrote:
> So if they do match - I don't need to use with them some wild characters
> (* or %)? And second question: Can I use % with = operator?
> I know - simple question, but I feel now a little confused - manual
> doesn't clear it either - I thought about it, but as long as all works
> fine - I haven't needed this knowledge.
Make the distinction between a MATCH and an EQUALITY. A "match" is
comparing to a pattern, and there can be more than one text that makes the
comparison work. The '=' does not take wildcards - it is an equality test.
It tests *exactly*.
An equality test has an advantage in index usage. Case-insensitive matching
doesn't trigger indices in any case (as far as I know). Case-sensitive
matching triggers them only if the pattern is anchored to the left (That
is, in a LIKE comparison, the pattern doesn't start with % or _, and in
regular expression, it starts with a ^ followed by simple characters).
Herouth
--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: herouth@oumail.openu.ac.il, rems@gdansk.sprint.pl
Subject: Re: [SQL] Newbie questions
In-Reply-To: <l03110710b29c1f4a7f9f@[147.233.159.109]>
References: <l0311070eb29c0a1081e5@[147.233.159.109]> <l03110710b29c1f4a7f9f@[147.233.159.109]>
* 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