composite types DROP..CASCADE behaviour - bug or intentional?

From: Nikhil Sontakke <nikhil(dot)sontakke(at)enterprisedb(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: composite types DROP..CASCADE behaviour - bug or intentional?
Date: 2009-02-13 12:15:18
Message-ID: a301bfd90902130415t7f40c333md0eeeb9fb8173609@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Consider the following on latest sources:

postgres=# create type c3 as (y int, z c1);
postgres=# create type comptype1 as (elem1 int);

postgres=# create type comptype2 as (elem1 int, elem2 comptype1);
postgres=# \d comptype2
Composite type "public.comptype2"
Column | Type
--------+-----------
elem1 | integer
elem2 | comptype1

postgres=# drop type comptype1 cascade;
NOTICE: drop cascades to composite type comptype2 column elem2
postgres=# \d comptype2
Composite type "public.comptype2"
Column | Type
--------+---------
elem1 | integer

Shouldn't the drop cascade have deleted comptype2 itself, instead of just
deleting the dependent column? Or this is the expected intentional
behaviour?

Regards,
Nikhils
--
http://www.enterprisedb.com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nikhil Sontakke 2009-02-13 12:17:07 Re: composite types DROP..CASCADE behaviour - bug or intentional?
Previous Message Teodor Sigaev 2009-02-13 12:06:15 Re: GIN fast insert