Array of created types

Поиск
Список
Период
Сортировка
От Kelly Burkhart
Тема Array of created types
Дата
Msg-id 1125587241.18140.27.camel@krb06.tradebot.com
обсуждение исходный текст
Ответы Re: Array of created types  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Should something similar to the following be possible in PG 8.0.3?

create type foo_t as ( c1 int, c2 int );
create table tab (
  name varchar not null,
  foos foo_t[]
);

The response I get is:

ERROR:  type "foo_t[]" does not exist

The create type documentation says that postgres silently creates an
array type for each base type with an underscore prepended to the base
name.  That makes it sound like the following should work:

create table tab (
  name varchar not null,
  foos _foo_t
);
ERROR:  type "_foo_t" does not exist


How can I create a table containing an array of items of a created type?

-K

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Order By for aggregate functions (Simulating Group_concat)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Transaction error