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

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

Well, from what I have read, oracle has 3 types that can be defined:
objects, tables and views (possibly more?) I'm basically working under the
assumption that

> > create or replace type MYSCHEMA.T_QUESTION_RESULT as object (
> > IND_QUESTION number,
> > N_ANSWER number
> > );

is the same as

> > create type MYSCHEMA.T_QUESTION_RESULT as (
> > IND_QUESTION NUMERIC,
> > N_ANSWER NUMERIC
> > );

meaning that types in postgresql map directly as type object in Oracle.
Now, Oracle basically defines type table as an indexed one column "table",
with that column being of some defined (or user) type (... as table of
type number... etc). I really have no clue how to map that functionality
to postgresql. I'm taking a shot that I can do something similar by
defining a type with one item in it where that item is an array of some
type. If anyone has a better idea, I'd be very interested in hearing it.

Thanks for the reply though! It certainly is helping me understand a few
things.

-James DeMond

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2005-02-01 16:08:27 Re: [NOVICE] Last ID Problem
Previous Message John Hansen 2005-02-01 14:48:49 Re: [NOVICE] Last ID Problem