Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-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

pgsql-hackers by date

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

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group