Re: Create type - Mailing list pgsql-general

From Renaud Tthonnart
Subject Re: Create type
Date
Msg-id 3A9B7F54.E1E57042@amwdb.u-strasbg.fr
Whole thread Raw
In response to RE:Create type  (Renaud Tthonnart <thonnart@amwdb.u-strasbg.fr>)
List 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@jps.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



pgsql-general by date:

Previous
From: Bill Barnes
Date:
Subject: postgresql-tcl-7.03 requires libtcl8.0.so
Next
From: Renaud Tthonnart
Date:
Subject: Re: Create type