arrays and subselects - Mailing list pgsql-general

From Dave Hollenbeck
Subject arrays and subselects
Date
Msg-id 14787.61294.275044.442854@moby5.fremenworks.org
Whole thread Raw
List pgsql-general
Hello all,

I'm trying to make use of PostgreSQL's array capability with very limited
success.

Is is possible to use the result of a "select arraycol" as a subquery
of the form "select foo from bar where col in (select arraycol from blah..."?

That seems to me to be an ideal use of the array type, but I haven't found
the magic incantation to make it work.  Am I totally missing the picture?

I'd also expect "select foo from bar where col in (select col1,col2,col3.."
to work, where the subquery is guaranteed to return N columns from a single
row.  Again, I feel like I must be missing something basic here (as in,
some sort of theoretical understanding of why this should or shouldn't
work).

Thanks for any tips or pointers.

Regards,
Dave

pgsql-general by date:

Previous
From: Ben Lanson
Date:
Subject: ERROR: plpgsql: cache lookup from pg_proc failed -- Why?
Next
From: "Joel Burton"
Date:
Subject: All function parameters become NULL if one is?