pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: holm@freibergnet.de
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] problem with select
Date: Tue, 31 Aug 1999 09:31:23 -0400
Message-ID: <15130.936106283@sss.pgh.pa.us> (raw)
In-Reply-To: <19990831082920.A23046@pegasus.freibergnet.de>

Holm Tiffe <holm@freibergnet.de> writes:
> It is almost working, my database isn't that big that memory becomes a
> problem; the machine has 512MB.
> But why is nothing found if one value of a column contains NULL ?

Because nulls propagate: any operator whose input is NULL produces NULL.
The only things that don't return NULL are the special syntaxes IS NULL,
IS NOT NULL, and CASE expressions using them (in particular the CASE
shortcuts COALESCE, etc).

You probably want to write COALESCE(field, '') in place of just field
for any column that can be NULL.

			regards, tom lane



view thread (7+ messages)  latest in thread

Message-ID: <15130.936106283@sss.pgh.pa.us>
Permalink:  ../15130.936106283@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/15130.936106283@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, holm@freibergnet.de
  Subject: Re: [SQL] problem with select
  In-Reply-To: <15130.936106283@sss.pgh.pa.us>
  References: <19990831082920.A23046@pegasus.freibergnet.de> <15130.936106283@sss.pgh.pa.us>

* 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