Re: [HACKERS] Re: [QUESTIONS] using composite types
Bruce Momjian <maillist@candle.pha.pa.us>
From: Bruce Momjian <maillist@candle.pha.pa.us>
To: lockhart@alumni.caltech.edu (Thomas G. Lockhart)
Cc: hackers@postgreSQL.org (PostgreSQL-development)
Date: 1998-03-13T16:14:14Z
Lists: pgsql-hackers
> What you want to do can probably be accomplished with inheritance, but > that only seems to work if you have unique names for more of your > fields: > > create table A ( a int, b int); > create table D ( c int) inherits (A); > > But, if you try > > create table D ( b int) inherits (A); > > then the new column in D gets lost without warning! Patient: Ow, doctor, it hurts when I do this. Doctor: Well, then don't do that. --------------------------------------------------------------------------- This is a pretty bizarre example, and I am not sure how the system will handle this. My guess is that it finds only the first b. Seems like we need a check somewhere when making inheritance. I will add it to the TODO. * disallow inherited columns with the same name as new columns -- Bruce Momjian | 830 Blythe Avenue maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026 + If your life is a hard drive, | (610) 353-9879(w) + Christ can be your backup. | (610) 853-3000(h)