Re: Question about inheritance - Mailing list pgsql-hackers

From chris.bitmead@health.gov.au
Subject Re: Question about inheritance
Date
Msg-id CA256A62.0011CAAF.00@mtascbr01.notes.health.gov.au
Whole thread Raw
In response to Question about inheritance  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
List pgsql-hackers


>It's relatively straightforward to allow check constraints to be inherited -
>but is it really possible to ever do the same with primary, unique or even
>foreign constraints?

You would either have to check each index in the hierarchy or else have
a single index across the whole hierarchy and check that. Obviously the
latter would be generally more useful.

As with all things inheritance, it is usually the right thing, and a good
default that things be inherited. So ideally, indexes should work across
whole hierarchies as well as primary, unique and foreign constraints.
It could be argued that not inheriting is of very limited usefulness.





pgsql-hackers by date:

Previous
From: "Joe Conway"
Date:
Subject: remote database queries
Next
From: Roberto Fichera
Date:
Subject: Acucobol interface