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 must always be true on the supertable. For example, if I apply the constraint, "this int field must be no smaller than 1 and no larger than 100," to the supertable, this must apply to all subtables, and you must not be able to remove the 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 <[EMAIL PROTECTED]> +81 90 7737 2974 http://www.netbsd.org Don't you know, in this new Dark Age, we're all light. --XTC ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html