Skip to content

postgreSQL sucks in a different way

by andy on June 27th, 2005

A serious limitation of the inheritance feature is that indexes (including unique constraints) and foreign key constraints only apply to single tables, not to their inheritance children. This is true on both the referencing and referenced sides of a foreign key constraint. Thus, in the terms of the above example:

Specifying that another table’s column REFERENCES cities(name) would allow the other table to contain city names, but not capital names. There is no good workaround for this case.

so i’ve got inheritance.. i just can’t use it for polymorphism.. nice.

No related posts.

No comments yet

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS

Login with Facebook: