Re: Postgresql 8.3X supports Arrays of Composite Types?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Postgresql 8.3X supports Arrays of Composite Types?
Дата
Msg-id 12292.1240183532@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Postgresql 8.3X supports Arrays of Composite Types?  (Robson Fidalgo <rdnf@cin.ufpe.br>)
Список pgsql-general
Robson Fidalgo <rdnf@cin.ufpe.br> writes:
> I am using postgresql 8.3X and I created a table (see example below) that
> has an attribute that is an Array of a Composite Type (ROW). However, I do
> not know how can I insert a record in this table.

You need some explicit casts so that the array[] construct is seen to
have the right type, eg

insert into person values ('Joe', array[row('1','1111')::phone, row('2','2222')::phone]);

            regards, tom lane

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

Предыдущее
От: Robson Fidalgo
Дата:
Сообщение: Postgresql 8.3X supports Arrays of Composite Types?
Следующее
От: David Fetter
Дата:
Сообщение: Re: Postgresql 8.3X supports Arrays of Composite Types?