Re: Create type

From: Renaud Tthonnart <thonnart(at)amwdb(dot)u-strasbg(dot)fr>
To: "Eric G(dot) Miller" <egm2(at)jps(dot)net>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Create type
Date: 2001-02-27 10:20:04
Message-ID: 3A9B7F54.E1E57042@amwdb.u-strasbg.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Eric G. Miller" wrote:

> > Ok. First I wanted to use nested tables. But I think it is not
> > possible.
> >
> > Then I decided to create a type that will made the same function, a
> > type that will be like a C structure. This type would contain an
> > integer and a string like (1,'aaa'). Then I would have made a list or
> >
> > an array with this type. Am I clear? Sorry if not, my English is
> > poor.
>
> I think the original question still stands. What are you trying do?
> Can't you map your "structure" to a regular table? A list of struct's
> containing one integer and one string sounds like a table containing
> one integer and one string (with the possible addition of an extra
> key field if the integer is not already an identifier).
>
> CREATE TABLE list_struct (
> i integer NOT NULL,
> c varchar(255) NOT NULL
> CHECK (char_length(c) > 0),
> PRIMARY KEY (i, c)
> );
>
> --
> Eric G. Miller <egm2(at)jps(dot)net>

Of course I can do that but I need one table of that kind for each row of
1000 tables that contain 10000 rows each.
That's the reason why I would have like using nested table.
Olk. I see that I want to do is not possible.
I just want to say that it is a bit disapointing that PostgreSQL that is
qualified OR/DBMS don't offer a way to create nested tables.
I think that will be interresting to add it in future versions.

Renaud THONNART

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Renaud Tthonnart 2001-02-27 10:23:34 Re: Create type
Previous Message Joseph 2001-02-27 10:10:14 RE: Trigger sending an eMail