Re: LIKE optimization

From: Nabil Sayegh <nsmail(at)sayegh(dot)de>
To: rob <rob(at)cabrion(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: LIKE optimization
Date: 2001-01-17 10:48:10
Message-ID: 3A65786A.F1608513@sayegh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

rob wrote:
>
> your using table.attrib like '%' to match everything except nulls
> right?
>
> use table.attribute IS NOT NULL instead.

No, it's the web interface to our hotel-db. People can search for eg.
City but may leave this field blank.
So % is always appended (sometimes also prepended).

I didn't know that it doesn't match NULL, but fortunately the attributes
are all NOT NULL.

thx
cu

--
Nabil Sayegh
GPG-Key available at http://www.sayegh.de
(see http://www.gnupg.org for details)

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Orlando Eloy Gentil 2001-01-17 11:04:11 Problems with authentication
Previous Message Tom Lane 2001-01-17 04:56:39 Re: log file?