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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: James DeMond <demond(at)cs(dot)dal(dot)ca>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Arrays of user-defined data types in other user-defined data types
Date: 2005-02-01 05:20:44
Message-ID: 10233.1107235244@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

James DeMond <demond(at)cs(dot)dal(dot)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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Fuhr 2005-02-01 05:30:13 Re: Last ID Problem
Previous Message Tom Lane 2005-02-01 04:33:01 Re: Function to blame?