Re: 9.17.5. Row-wise Comparison - Mailing list pgsql-sql

From Ragnar Hafstað
Subject Re: 9.17.5. Row-wise Comparison
Date
Msg-id 1112889114.5742.17.camel@localhost.localdomain
Whole thread Raw
In response to Re: 9.17.5. Row-wise Comparison  (TJ O'Donnell <tjo@acm.org>)
List pgsql-sql
On Thu, 2005-04-07 at 06:44 -0700, TJ O'Donnell wrote:
> it might break in future.
> 
>  >     if (b > 1) then true
>  >     else if (b = 1 and c > 2) then true
>  >     else if (b = 1 and c = 2 and d > 3) then true
>  >     else false
> Your spec sql snippet is like an OR, isn't it, instead
> of an AND as I'm reyling on?

not really.

> After PG is to spec, will the behaviour I now see change?

yes

> > "TJ O'Donnell" <tjo@acm.org> writes:
> > 
> >>I've been using syntax like
> >>select a from tbl where (b,c,d) > (1,2,3)
> >>   to mean
> >>select a from t where b>1 and b>2 and d>3

if b=2, c=1 and d=1 then the expression (b,c,d) > (1,2,3)
currently evaluates to false, but according to spec,
should evaluate to true.

gnari




pgsql-sql by date:

Previous
From: TJ O'Donnell
Date:
Subject: Re: 9.17.5. Row-wise Comparison
Next
From: Jeff Boes
Date:
Subject: Re: DROP TYPE without error?