Re: Re: [GENERAL] PRIMARY KEY & INHERITANCE (fwd)

From: "Stephan Szabo" <sszabo(at)kick(dot)com>
To: "Chris Bitmead" <chrisb(at)nimrod(dot)itg(dot)telstra(dot)com(dot)au>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [GENERAL] PRIMARY KEY & INHERITANCE (fwd)
Date: 2000-07-20 00:18:17
Message-ID: 00f501bff1e0$00bc9330$0c64010a@kick.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

> As a rule, anything that applies to a base class should also apply to
> the sub-class automatically. For some things you may want to have the
> option of excluding it, by something like the ONLY syntax of select, but
> 99% of the time everything should just apply to sub-classes.
That makes sense. I assume that you cannot remove the unique constraint
that
a parent provides, once those start being inherited. This is mostly because
foreign key references really only work in the presence of a unique
constraint.

> Storing oids of attributes sounds like a problem in this context because
> it may make it hard to relate these to sub-classes. I do really think
> that the system catalogs should be re-arranged so that attributes have
> two parts - the parts that are specific to that class, and the parts
> that also apply to sub-classes. For example the type and the length
> should probably apply to sub-classes. The attnum and the name should
> probably be individual to each class in the hierarchy. (The name should
> be individual to support subclass renaming to avoid naming conflicts,
> like in the draft SQL3 and Eiffel). If it is in two parts then using the
> oid of the common part would make it easy for your purposes.
How would one refer to an attribute whose name has changed in a
subclass if you're doing a select on the superclass (or do you even
need to do anything - does it figure it out automagically?)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mikheev, Vadim 2000-07-20 00:22:36 RE: unique constraint - bug?
Previous Message Tom Lane 2000-07-19 23:59:14 Re: Does CREATE FUNCTION... WITH (ISCACHABLE) work?

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-07-20 00:21:04 Re: btree split logic is fragile in the presence of lar ge index items
Previous Message Mikheev, Vadim 2000-07-20 00:17:11 RE: btree split logic is fragile in the presence of lar ge index items