On Wed, Sep 2, 2009 at 9:47 AM, Massa, Harald Armin<chef@ghum.de> wrote:
> Sam,
>
>> To all: is there a deeper reason why there is no array type for datatype
>> record available?
>>
>> Not enough demand :)
>
> seams reasonable :)
>
>>
>> Try:
>>
>> CREATE TYPE intarr AS (arr int[]);
>> SELECT array(
>> SELECT x::intarr FROM (
>> SELECT array[2,3]
>> UNION ALL
>> SELECT array[3,4]) x(a));
>>
>> and it should do the right thing in 8.3.
>
> not exactly :)
> ibox=# CREATE TYPE intarr AS (arr int[]);
> CREATE TYPE
> ibox=# SELECT array(
> SELECT x::intarr FROM (
> SELECT array[2,3]
> UNION ALL
> SELECT array[3,4]) x(a));
> ?column?
> -------------------------------
> {"(\"{2,3}\")","(\"{3,4}\")"}
> (1 Zeile)
>
> .... the result seems to be an array with two strings containing escaped
> string-represenations of arrays :)
nope...it's an array of composite types, each type with one field, and
array of two ints. this is waht you wanted? what are you trying to do
exactly?
merlin