5 ms·
table inheritance is cool, but it's also incomplete, docs are pretty clear on that
by dotborg2 14y ago
table inheritance is cool, but it's also incomplete, docs are pretty clear on that
- einhverfr 14y agoYeah, I want inherited unique constraints for things which are guaranteed unique in an inheritance tree. However, there are ways around this. You can, for example, use a composite key with the something related to the specific table in it. For example our note table (an abstract class if you will) has a note_class field which is set to different default values and with different check constraints on the child tables. Also foreign keys are a bit of an annoyance in an inherited table environment.