Re: [SQL] Passing arrays

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Michael Weaver <mweaver(at)corpusglobe(dot)com>
Cc: "'pgsql-novice(at)postgresql(dot)org'" <pgsql-novice(at)postgresql(dot)org>, "'pgsql-sql(at)postgresql(dot)org'" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: [SQL] Passing arrays
Date: 2003-02-14 04:57:33
Message-ID: 20030213205623.V56568-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice pgsql-sql


On Fri, 14 Feb 2003, Michael Weaver wrote:

> How do you get an array of elements to be passed to a stored proc such that
> you can use the array in a SELECT statement in the WHERE clause
> - e.g. WHERE field IN (array) etc...

A straight WHERE field IN (array) doesn't work. That's attempting to
compare the field directly to the array as a whole (which is why you get
the particular error you do.

You might want to look at contrib/array for some loadable
functions/operators in working with arrays.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Weaver 2003-02-14 08:09:55 Re: [SQL] Passing arrays
Previous Message Josh Berkus 2003-02-14 04:14:15 Re: [SQL] Passing arrays

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2003-02-14 05:20:34 Re: rownum
Previous Message Josh Berkus 2003-02-14 04:56:20 Re: rownum