Re: Arrays of user-defined data types in other user-defined data types

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Arrays of user-defined data types in other user-defined data types
Дата
Msg-id 10233.1107235244@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Arrays of user-defined data types in other user-defined data types  (James DeMond <demond@cs.dal.ca>)
Ответы Re: Arrays of user-defined data types in other user-defined  (James DeMond <demond@cs.dal.ca>)
Список pgsql-novice
James DeMond <demond@cs.dal.ca> writes:
> What I'm trying to do is this:
>
> create type MYSCHEMA.T_QUESTION_RESULT as (
>     IND_QUESTION NUMERIC,
>     N_ANSWER NUMERIC
> );
>
> create type MYSCHEMA.T_QUESTION_RESULT_LIST as (
>     col1 MYSCHMA.T_QUESTION_RESULT[]
> );

We don't support arrays of composite types at the moment.

> Truth be told, I'm actually trying to port this from some definitions I
> have from Oracle which look like this:
>
> create or replace type MYSCHEMA.T_QUESTION_RESULT as object (
>     IND_QUESTION number,
>     N_ANSWER number
> );
>
> create or replace type MYSCHEMA.T_QUESTION_RESULT_LIST as table of
> T_QUESTION_RESULT;

I'm not sure what Oracle thinks the latter construct really means?
Perhaps you shouldn't be trying to map it into an array.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Function to blame?
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: Last ID Problem