Re: creating array of integer[] out of query - how?

Поиск
Список
Период
Сортировка
От Massa, Harald Armin
Тема Re: creating array of integer[] out of query - how?
Дата
Msg-id e3e180dc0909020250l475e380m834d1c5c083e4096@mail.gmail.com
обсуждение исходный текст
Ответ на Re: creating array of integer[] out of query - how?  (Sam Mason <sam@samason.me.uk>)
Ответы Re: creating array of integer[] out of query - how?  (Sam Mason <sam@samason.me.uk>)
Список pgsql-general
Sam,

No, as depesz says it's not doing that.  Depending on what you want out
you can get most of the way by having an array of ROWs that contain an
array of integers.  You just need to change:

the sad thing is:

  select array(
 select x from (
 select array[2,3] as a
 union
 select array[3,4] as a ) x);

ERROR:  could not find array type for datatype record

... I remember being there before :( arrays of rows are also not available.

To all: is there a deeper reason why there is no array type for datatype record available?

  [1] http://www.postgresql.org/docs/current/static/sql-createtype.html

Thanks for the hint with CREATE TYPE, especially the lines

"""
Whenever a user-defined type is created, PostgreSQL automatically creates an associated array type,
"""
fills me with joy. ;)

Thanks to depesz & you,

Harald

--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Spielberger Straße 49
70435 Stuttgart
0173/9409607
no fx, no carrier pigeon
-
LASIK good, steroids bad?

В списке pgsql-general по дате отправления:

Предыдущее
От: "Markus Wanner"
Дата:
Сообщение: PostgreSQL Conference 2009 Japan
Следующее
От: Sam Mason
Дата:
Сообщение: Re: creating array of integer[] out of query - how?