Subject: Searching for empty String.

From: Michael Reifenberger <[email-masked]>
Date: Fri, 6 May 1994 01:49:34 +0200 (MET DST)

Hi. My first question to the list is:
How can I retrieve for empty strings.
After creating:
 create C (num=int4, name=text)
and after reading in from a file I have:
spog > retrieve (C.all)
 124          (null)      
 2234         gfgfg       
 22           (null)      

Ok, so far, so good.

Now if I do:
retrieve (C.all) where C.name = ""
I get no results but from my understanding it should be:
 124          (null)
 22           (null)

Is this a bug or feature?
Is the any way to retrieve empty (null) fields?

Bye!
....
Michael Reifenberger

===============================================================================
    To add/remove yourself from the POSTGRES mailing list: send mail with 
    the subject line ADD or DEL to "[email-masked]"

    If this fails, send mail to "[email-masked]" and
    a human will deal with it.  DO NOT post to the "postgres" mailing list.
===============================================================================

---

From: [email-masked] (Paul M. Aoki)
Date: Thu, 05 May 94 17:19:46 -0700

> Is the any way to retrieve empty (null) fields?

null is not the same as an empty string.

if your fields contain zero-length strings, the query you gave (where 
foo.bar = "") will retrieve them.

if your fields contain null, you should use the ISNULL and NOTNULL
keywords as documented in the manual.
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  [email-masked]
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki