Re: creating array of integer[] out of query - how?
От | Merlin Moncure |
---|---|
Тема | Re: creating array of integer[] out of query - how? |
Дата | |
Msg-id | b42b73150909020731qa02cb4cs31bbfce19b884ef3@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: creating array of integer[] out of query - how? ("Massa, Harald Armin" <chef@ghum.de>) |
Ответы |
Re: creating array of integer[] out of query - how?
|
Список | pgsql-general |
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
В списке pgsql-general по дате отправления: