"IS NOT NULL" != "NOT NULL"

From: Sean Chittenden <sean(at)chittenden(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: "IS NOT NULL" != "NOT NULL"
Date: 2002-01-12 03:46:52
Message-ID: 20020111194652.L352@ninja1.internal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Just a question that's stems from curiosity, but:

db=> SELECT COUNT(*) FROM pkg_hosts WHERE timestamp_col NOT NULL;
count
-------
0
(1 row)

db=> SELECT COUNT(*) FROM pkg_hosts WHERE timestamp_col IS NOT NULL;
count
-------
1242
(1 row)

Why aren't those the same? Seems like the IS would be an extra word
that's not necessarily needed. ::shrug:: -sc

--
Sean Chittenden

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andy Samuel 2002-01-12 04:35:14 again, LIKE operator
Previous Message Tom Lane 2002-01-12 03:38:54 Re: 7.2 Beta timezone woes