Re: [GENERAL] child table doesn't inherit PRIMARY KEY?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [GENERAL] child table doesn't inherit PRIMARY KEY?
Date: 2001-01-24 19:31:29
Message-ID: 200101241931.OAA26463@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-general pgsql-hackers

> On Wed, 24 Jan 2001, Bruce Momjian wrote:
>
> >
> > OK, what do people want to do with this item? Add to TODO list?
> >
> > Seems making a separat unique constraint would be easy to do and be of
> > value to most users.
>
> The problem is that doing that will pretty much guarantee that we won't
> be doing foreign keys to inheritance trees without changing that behavior
> and we've seen people asking about adding that too. I think that this
> falls into the general category of "Make inheritance make sense" (Now
> there's a todo item :) ) Seriously, I think the work on how inheritance
> is going to work will decide this, maybe we end up with a real inheritance
> tree system and something that works like the current stuff in which case
> I'd say it's probably one unique for the former and one per for the
> latter.

I smell TODO item. In fact, I now see a TODO item:

* Unique index on base column not honored on inserts from inherited table
INSERT INTO inherit_table (unique_index_col) VALUES (dup) should fail
[inherit]

So it seems the fact the UNIQUE doesn't apply to the new table is just a
manifestion of the fact that people expect UNIQUE to span the entire
inheritance tree. I will add the emails to [inherit] and mark it as
resolved.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Kevin Lo 2001-01-24 19:52:45 Re: MS FAQ
Previous Message Stephan Szabo 2001-01-24 19:25:35 Re: [GENERAL] child table doesn't inherit PRIMARY KEY?

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2001-01-24 19:33:31 Re: LO to text conversion
Previous Message Wade D. Oberpriller 2001-01-24 19:29:00 pg_ctl bug

Browse pgsql-hackers by date

  From Date Subject
Next Message Rod Taylor 2001-01-24 19:48:35 pg_dump issues
Previous Message Stephan Szabo 2001-01-24 19:25:35 Re: [GENERAL] child table doesn't inherit PRIMARY KEY?