Re: comparators and "error"
Arnt Gulbrandsen <arnt@gulbrandsen.priv.no> Wed, 10 May 2006 19:05 UTC
Received: from balder-227.proper.com (localhost [127.0.0.1]) by balder-227.proper.com (8.13.5/8.13.5) with ESMTP id k4AJ5fJf075992; Wed, 10 May 2006 12:05:41 -0700 (MST) (envelope-from owner-ietf-mta-filters@mail.imc.org)
Received: (from majordom@localhost) by balder-227.proper.com (8.13.5/8.13.5/Submit) id k4AJ5f4N075991; Wed, 10 May 2006 12:05:41 -0700 (MST) (envelope-from owner-ietf-mta-filters@mail.imc.org)
X-Authentication-Warning: balder-227.proper.com: majordom set sender to owner-ietf-mta-filters@mail.imc.org using -f
Received: from kalyani.oryx.com (kalyani.oryx.com [195.30.37.30]) by balder-227.proper.com (8.13.5/8.13.5) with ESMTP id k4AJ5d3F075984 for <ietf-mta-filters@imc.org>; Wed, 10 May 2006 12:05:39 -0700 (MST) (envelope-from arnt@gulbrandsen.priv.no)
Received: from libertango.oryx.com (libertango.oryx.com [195.30.37.9]) by kalyani.oryx.com (Postfix) with ESMTP id B5B5F4AC32; Wed, 10 May 2006 21:05:37 +0200 (CEST)
Message-Id: <oyvlQ4PzQ3IFvV/ROIj/PA.md5@libertango.oryx.com>
Date: Wed, 10 May 2006 21:09:17 +0200
From: Arnt Gulbrandsen <arnt@gulbrandsen.priv.no>
To: ietf-mta-filters@imc.org
Subject: Re: comparators and "error"
Cc: Alexey Melnikov <alexey.melnikov@isode.com>, Dave Cridland <dave@cridland.net>
References: <buylDuhckrLTBjUJ7Xr9Kg.md5@libertango.oryx.com> <4461F280.3050900@isode.com> <24437.1147282219.539822@peirce.dave.cridland.net>
In-Reply-To: <24437.1147282219.539822@peirce.dave.cridland.net>
Content-Type: text/plain; format="flowed"
MIME-Version: 1.0
Sender: owner-ietf-mta-filters@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-mta-filters/mail-archive/>
List-ID: <ietf-mta-filters.imc.org>
List-Unsubscribe: <mailto:ietf-mta-filters-request@imc.org?body=unsubscribe>
Dave Cridland writes:
> I'm really not so sure. On the face of it, it sounds like bad design,
> but I think there's at least two cases here - an attempt to compare
> "fish" and "bicycle", and an attempt to compare "fish" and "2". I
> have a feeling this is an important distinction.
It is precisely the distinction between "neither input is valid" and
"one input is valid, the other not".
> Arguably, "fish" is equal in numeric value to "bicycle" - they both
> have no numeric value, so it's the same as comparing NIL and NIL with
> "i;octet".
Or as comparing null with null in SQL.
> Equally, "2" has a numeric value of 2, whereas "fish" does not, so
> they are unequal - like comparing NIL and an existing string with
> "i;octet".
Or as comparing 2 with null in SQL. And wouldn't you know, SQL is
different from ACAP in this respect.
x=> select 42 as answer where 2=2;
answer
--------
42
(1 row)
x=> select 42 as answer where 2!=0;
answer
--------
42
(1 row)
Makes sense so far? Let's compare things with null a little:
x=> select 42 as answer where 2=null;
answer
--------
(0 rows)
x=> select 42 as answer where 2!=null;
answer
--------
(0 rows)
x=> select 42 as answer where not(2=null);
answer
--------
(0 rows)
x=> select 42 as answer where null=null;
answer
--------
(0 rows)
I'd rather not venture into this dark and confusing maze of null/nil
semantics. These are choices for the protocol to make, say I.
Instead, I think I'll add a fourth operator, valid, which indicates
whether a given string is valid input for the collation. It's not
really necessary. indomain(a) is true if and only if a=a. But it sounds
sensible. Permits protocols to differentiate between one and two
invalid inputs if they want to, without resorting to hacks like a=a.
Arnt
- comparators and "error" Arnt Gulbrandsen
- Re: comparators and "error" Dave Cridland
- Re: comparators and "error" Alexey Melnikov
- Re: comparators and "error" Arnt Gulbrandsen
- Re: comparators and "error" Dave Cridland
- Re: comparators and "error" Arnt Gulbrandsen
- Re: comparators and "error" Dave Cridland