Search Postgresql Archives

Re: searching array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthew Peter <survivedsushi@xxxxxxxxx> writes:
> I was trying to search a array with a GTE to value and
> it doesn't work. Is this supported? Or am I missing
> something?

> SELECT * FROM sal_emp WHERE 10000 >= ALL (pay_by_quarter);

Define "doesn't work".  Do you get an error --- if so, what exactly?
Do you get unexpected results --- if so, what?  And what version of
Postgres are you using?

AFAIK it works in 7.4 and up:

regression=# select 100 >= all(array[1,2,4]);
 ?column? 
----------
 t
(1 row)

regression=# select 100 >= all(array[1,2,101]);
 ?column? 
----------
 f
(1 row)


			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux