Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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.


 Nabil Sayegh
 GPG-Key available at 
 (see for details)

In response to


pgsql-novice by date

Next:From: Orlando Eloy GentilDate: 2001-01-17 11:04:11
Subject: Problems with authentication
Previous:From: Tom LaneDate: 2001-01-17 04:56:39
Subject: Re: log file?

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group