Re: Arrays of user-defined data types in other user-defined data types - Mailing list pgsql-novice

From Tom Lane
Subject Re: Arrays of user-defined data types in other user-defined data types
Date
Msg-id 10233.1107235244@sss.pgh.pa.us
Whole thread Raw
In response to Arrays of user-defined data types in other user-defined data types  (James DeMond <demond@cs.dal.ca>)
Responses Re: Arrays of user-defined data types in other user-defined  (James DeMond <demond@cs.dal.ca>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: Function to blame?
Next
From: Michael Fuhr
Date:
Subject: Re: Last ID Problem