Re: Bug and/or feature? Complex data types in tables...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Chris Travers" <chris(at)travelamericas(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Bug and/or feature? Complex data types in tables...
Date: 2003-12-31 16:46:34
Message-ID: 10921.1072889194@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

"Chris Travers" <chris(at)travelamericas(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-12-31 17:05:10 Re: What does count(*) count?
Previous Message Karsten Hilbert 2003-12-31 16:46:30 Re: What does count(*) count?

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Treat 2003-12-31 17:16:17 Re: Is my MySQL Gaining ?
Previous Message Robert Treat 2003-12-31 16:37:15 Re: Is my MySQL Gaining ?