On Thu, 23 Mar 2006 11:44:32 -0800
Don Maier <dMaier@genome.stanford.edu> threw this fish to the penguins:
> Is it possible to construct an array from an appropriate select
> expression that generates a result set of unknown cardinality?
> To focus on the simple case: Is it possible to construct a one-
> dimensional array from a select of a single column in a table with an
> unknown number of rows?
select array(select some_int_field from my_table where something);
produces an array of integers. No user defined function is required.
> Conversely, is it possible to construct a (single column) result set
> from a select expression on a one-dimensional array with an unknown
> number of elements?
Not so easy without a custom function.
> Thanks for any hints!
>
> Regards,
> Don Maier
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>
--
"Are the gods not just?" "Oh no, child.
What would become of us if they were?" (CSL)