please help me with arrays

From: Bo Berkhaut <bo(at)syntext(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: please help me with arrays
Date: 2000-10-22 21:10:20
Message-ID: 20001023011020.B39203@caesar.corp.syntext.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi!
Would you please explain me how can I express in PostgreSQL the notion of
"any element of the array". Having a table like:

CREATE TABLE example (name text, slots text[]);

I want to be able to select, for example, all rows such that an element
of example.slots exists equal to example.name.
Something like:

SELECT name FROM example WHERE example.name = example.slots[*];

If I wrong from the very begining and such things should be done
in other way -- please tell me how.
Sorry, if my question is stupid or formulated incorrectly.
Thanks in advance,
--bo

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2000-10-22 21:43:52 Re: duplicate key ? (fwd)
Previous Message Jan Wieck 2000-10-22 17:41:36 Re: Re: [HACKERS] My new job