dbTalk Databases Forums  

[BUGS] BUG #1770: Composite type dependency broken

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #1770: Composite type dependency broken in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
David Fetter
 
Posts: n/a

Default [BUGS] BUG #1770: Composite type dependency broken - 07-14-2005 , 11:51 PM







The following bug has been logged online:

Bug reference: 1770
Logged by: David Fetter
Email address: david (AT) fetter (DOT) org
PostgreSQL version: 8.0.3
Operating system: Linux
Description: Composite type dependency broken
Details:

Here's a repro (psql):

create table foo (foo_id SERIAL PRIMARY KEY, foo_text TEXT NOT NULL);
CREATE type two_foos AS (foo1 foo, foo2 foo);
CREATE type four_foos AS (two_foo1 two_foos, two_foo2 two_foos);
DROP TABLE foo CASCADE;

Perhaps I have misunderstood, but I would think that both two_foos and
four_foos would disappear as a result of this. They don't :/

Cheers,
D

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Reply With Quote
  #2  
Old   
Stephan Szabo
 
Posts: n/a

Default Re: [BUGS] BUG #1770: Composite type dependency broken - 07-15-2005 , 12:23 AM






On Fri, 15 Jul 2005, David Fetter wrote:

Quote:
Here's a repro (psql):

create table foo (foo_id SERIAL PRIMARY KEY, foo_text TEXT NOT NULL);
CREATE type two_foos AS (foo1 foo, foo2 foo);
CREATE type four_foos AS (two_foo1 two_foos, two_foo2 two_foos);
DROP TABLE foo CASCADE;

Perhaps I have misunderstood, but I would think that both two_foos and
four_foos would disappear as a result of this. They don't :/
I think the current definition is that the columns of the removed type
disappear, which means two_foos becomes a type with no columns rather than
it being removed.



---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings


Reply With Quote
  #3  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #1770: Composite type dependency broken - 07-15-2005 , 12:29 AM



"David Fetter" <david (AT) fetter (DOT) org> writes:
Quote:
create table foo (foo_id SERIAL PRIMARY KEY, foo_text TEXT NOT NULL);
CREATE type two_foos AS (foo1 foo, foo2 foo);
CREATE type four_foos AS (two_foo1 two_foos, two_foo2 two_foos);
DROP TABLE foo CASCADE;

Perhaps I have misunderstood, but I would think that both two_foos and
four_foos would disappear as a result of this. They don't :/
No; their columns disappear, but the types don't. This is just the same
as not trashing an entire table when a single column's type is dropped
--- that propagates as a DROP COLUMN, not a DROP TABLE.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.