Merlin Moncure <mmoncure@gmail.com> writes:
> On Fri, Apr 15, 2011 at 1:34 PM, Rikard Pavelic
> <rikard.pavelic@zg.htnet.hr> wrote:
>> CREATE TYPE turtle AS
>> (
>> name varchar
>> );
>> ALTER TYPE turtle ADD ATTRIBUTE offspring turtle;
> This is a duplicate: see Mar 28 thread 'Recursive containment of
> composite types'. Was it decided whether to lock the functionality
> down or fix it?
The former.
regression=# CREATE TYPE turtle AS
(
name varchar
);
CREATE TYPE
regression=# ALTER TYPE turtle ADD ATTRIBUTE offspring turtle;
ERROR: composite type turtle cannot be made a member of itself
regression=#
regards, tom lane