Re: [SQL] 9.17.5. Row-wise Comparison

2005-04-07 Thread Ragnar HafstaĆ°
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 AN

Re: [SQL] 9.17.5. Row-wise Comparison

2005-04-07 Thread TJ O'Donnell
I believe I started the multi-column index thread a few months back, but now that I have it working so well, I'm a bit nervous 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 sq

Re: [SQL] 9.17.5. Row-wise Comparison

2005-04-06 Thread Tom Lane
"TJ O'Donnell" <[EMAIL PROTECTED]> 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 > But I see in the manual at: > http://www.postgresql.org/docs/7.4/interactive/functions-comparisons.html#AEN12735 > that on

[SQL] 9.17.5. Row-wise Comparison

2005-04-06 Thread TJ O'Donnell
In tbl with columns a,b,c,d. 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 But I see in the manual at: http://www.postgresql.org/docs/7.4/interactive/functions-comparisons.html#AEN12735 that only = and <> operators are supp