Re: Bug and/or feature? Complex data types in tables... - Mailing list pgsql-general

From Tom Lane
Subject Re: Bug and/or feature? Complex data types in tables...
Date
Msg-id 10921.1072889194@sss.pgh.pa.us
Whole thread Raw
In response to Bug and/or feature? Complex data types in tables...  ("Chris Travers" <chris@travelamericas.com>)
List pgsql-general
"Chris Travers" <chris@travelamericas.com> writes:
> Try the following example:

> CREATE TABLE test1 (
>     test_id SERIAL,
>     test_text TEXT
> );

> CREATE TABLE test2 (
>     other_test test1,
>     test_text text
> );

This should in fact be disallowed, I think.  Back in the pre-SQL days of
Berkeley Postgres, there actually was a feature that involved declaring
table columns this way, but it did NOT work the way you think ;-), and
in any case it has been broken for many years.

I'm not sure why we've never taken the step of preventing complex types
from being declared as fields of other types.  I suppose there's some
thought that we'll eventually support it, but I don't believe that that
day is real close.

            regards, tom lane

pgsql-general by date:

Previous
From: Robert Treat
Date:
Subject: Re: Is my MySQL Gaining ?
Next
From: Karsten Hilbert
Date:
Subject: Re: What does count(*) count?