Re: [GENERAL] Postgresql 8.3X supports Arrays of Composite Types?

Поиск
Список
Период
Сортировка
Искать

Re: [GENERAL] Postgresql 8.3X supports Arrays of Composite Types?

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Robson Fidalgo  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
FAQ