From: | Michael Glaesemann <grzm(at)seespotcode(dot)net> |
---|---|
To: | Scott Ribe <scott_ribe(at)killerbytes(dot)com> |
Cc: | pgsql general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: NULLs ;-) |
Date: | 2006-11-28 00:45:42 |
Message-ID: | 1CE7AC58-A352-4BC8-92CB-E1CE9B514003@seespotcode.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Nov 28, 2006, at 9:37 , Scott Ribe wrote:
>> (Can we talk about NULL next? :P)
>
> Seriously though, there is one thing I've been meaning to bring up. I
> understand why NULLs compare the way they do in queries, and that's
> fine.
> But there are times when I need to query what would be described in
> relational terms as "not known to be equal", and
>
> where a <> b or (a is null and b is not null) or (a is not null
> and b is
> null)
> So, first, have I missed some way to express that more easily in
> PG? And if
> not, is there any reason not to request a new operator? (Perhaps "a
> nktbe
> b"? The C guy in me prefers "a != b" but that would be *FAR* too
> prone to
> confusion with <>.)
Check out IS DISTINCT FROM
http://www.postgresql.org/docs/current/interactive/functions-
comparison.html
I think that will help you.
Michael Glaesemann
grzm seespotcode net
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2006-11-28 00:46:12 | Re: Unexpected sort order. |
Previous Message | Gregory S. Williamson | 2006-11-28 00:41:40 | Re: postgresql bug |