arrays and subselects

From: Dave Hollenbeck <dave(at)fremenworks(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: arrays and subselects
Date: 2000-09-16 22:08:46
Message-ID: 14787.61294.275044.442854@moby5.fremenworks.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-general by date

  From Date Subject
Next Message Joel Burton 2000-09-16 22:47:35 All function parameters become NULL if one is?
Previous Message Ben Lanson 2000-09-16 19:16:35 ERROR: plpgsql: cache lookup from pg_proc failed -- Why?