Re: searching array

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Matthew Peter <survivedsushi(at)yahoo(dot)com>
Cc: Joe Conway <mail(at)joeconway(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: searching array
Date: 2005-10-17 18:50:39
Message-ID: 10723.1129575039@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Matthew Peter <survivedsushi(at)yahoo(dot)com> writes:
> Shouldn't >= also return Carols records since she
> contains records GREATER THAN 10000?

You seem to be reading the construct backwards.

x >= ALL (array)

is true if x >= every member of the array. This is clearly false
for x = 10000 and array = {20000, 25000, 25000, 25000} ... in fact,
x isn't >= any of those members.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Matthew Peter 2005-10-17 18:54:50 Re: searching array
Previous Message Jim C. Nasby 2005-10-17 18:50:25 Re: [pgsql-advocacy] Oracle buys Innobase