Search Postgresql Archives

Check a value in array

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

 



Hi all.

In _PostgreSQL 7.3.5_, I have to check if a value is in an array.

I've got an array of dates (date[]) in a table and I would like to
perform queries like: 

SELECT * FROM table WHERE date IN dates_array;

I've tried using array_contains_date (contrib/array_iterator.sql)
function unsuccessfully:

SELECT array_contains_date(dates_array, date);

WARNING:  plpgsql: ERROR during compile of array_contains_date near line
5. ERROR:  missing .. at end of SQL expression

Anyone can help me?
Thanks,
Marco


---------------------------(end of broadcast)---------------------------
TIP 7: 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