Check a value in array - Mailing list pgsql-sql

From Marco Lazzeri
Subject Check a value in array
Date
Msg-id 1083260230.20352.7.camel@macbeth.intranet.noze.it
Whole thread Raw
Responses Re: Check a value in array
List pgsql-sql
Hi all.

I have to check if a value is in an array.

I've got a date array 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




pgsql-sql by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Use arrays or not?
Next
From: Rod Taylor
Date:
Subject: Re: Check a value in array