Received: from shaked.cc.openu.ac.il (shaked.cc.openu.ac.il [147.233.145.65]) by hub.org (8.9.1/8.9.1) with ESMTP id JAA06845 for ; Tue, 15 Dec 1998 09:29:08 -0500 (EST) (envelope-from herouth@oumail.openu.ac.il) Received: from [147.233.159.109] (herouth@mac-herouth.pc.openu.ac.il [147.233.159.109]) by shaked.cc.openu.ac.il (8.8.8/8.8.8) with ESMTP id QAA17250; Tue, 15 Dec 1998 16:27:55 +0200 (IST) X-Sender: herouth@shaked.cc.openu.ac.il Message-Id: In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Tue, 15 Dec 1998 16:29:09 +0200 To: Remigiusz Sokolowski From: Herouth Maoz Subject: Re: [SQL] Newbie questions Cc: pgsql-sql@postgreSQL.org 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