Re: Inheritance

Поиск
Список
Период
Сортировка
От Curt Sampson
Тема Re: Inheritance
Дата
Msg-id Pine.NEB.4.44.0208150900010.463-100000@angelic.cynic.net
обсуждение исходный текст
Ответ на Re: Inheritance  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Inheritance
Список pgsql-hackers
On Wed, 14 Aug 2002, Tom Lane wrote:

> I agree.  Table-spanning indexes would be a large, complex,
> difficult-to-get-right feature.  Before diving into that we should get
> some idea of just how we'd actually use them, and whether that's the
> only big chunk of work standing between us and a more useful inheritance
> feature.  I'm afraid we might do all that effort and then discover there
> are other showstoppers.

That's my biggest fear as well. Here are a couple of possible
assertions we could make about supertables and subtables that have,
I think, some fairly far-reaching implications.
   1. All constraints one places on a supertable must "work." That is,   they must apply on all subtables as well, and
mustalways be true   on the supertable. For example, if I apply the constraint, "this   int field must be no smaller
than1 and no larger than 100," to the   supertable, this must apply to all subtables, and you must not be   able to
removethe constraint from just a subtable."
 
   2. It must not be possible apply a constraint to a supertable that   could be violated.
   3. All constraints that one can apply to a non-inherited table in   postgresql must also be able to be applied to a
supertable.

Depending on which of these you want to implement, and how you do
it, you may get yourself into a position where you can create a
table that that cannot have subtables, or cannot put certain constraints
on supertables....

cjs
-- 
Curt Sampson  <cjs@cynic.net>   +81 90 7737 2974   http://www.netbsd.org   Don't you know, in this new Dark Age, we're
alllight.  --XTC
 



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Vince Vielhaber
Дата:
Сообщение: Re: Open 7.3 items
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Inheritance