pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Marco Lazzeri <marcomail@noze.it>
To: pgsql-sql@postgresql.org
Subject: Check a value in array
Date: Thu, 29 Apr 2004 19:37:11 +0200
Message-ID: <1083260230.20352.7.camel@macbeth.intranet.noze.it> (raw)

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





view thread (5+ messages)  latest in thread

Message-ID: <1083260230.20352.7.camel@macbeth.intranet.noze.it>
Permalink:  ../1083260230.20352.7.camel@macbeth.intranet.noze.it/
Also on:    postgresql.org/message-id/1083260230.20352.7.camel@macbeth.intranet.noze.it

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: marcomail@noze.it
  Subject: Re: Check a value in array
  In-Reply-To: <1083260230.20352.7.camel@macbeth.intranet.noze.it>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox