Here's Tom Lane's response to my original post on pgsql-sql:

This seems to have considerable overlap with the problem of indexing
inheritance hierarchies (so that constraints on tables with children
would work as people expect).  It may be that it's sufficient to solve
it for inheritance cases, and not try to support the generic case of
constraints applied across arbitrary sets of tables.  ISTM that the
latter could introduce a bunch of extra definitional and practical
issues beyond what you'd have to solve to do the former.

You're discussing it on the wrong list though --- try -hackers.

Hadn't thought of distributed keys being related to inheritance, though now I can see how one might apply inheritance to the situations I mentioned above. Is this what you were thinking, Tom?


Case 1:

employees (id, name)
schools (name, location)

teachers (id, name, school_name)
where (id, name) inherits from employees and school_name references schools(name)
subs (id, name) inherits from employees
managers (id, name, school_name)
where (id, name) inherits from employees and school_name references schools(name)


Case 3

comments (comment_id, comment)
employees(id, name)
comments_nonemployees (comment_id, comment, name)
where (id, comment) inherits from comments
comments_employees (comment_id, comment, employee_id)
where (comment_id,comment) inherits from comments, employee_id references employees(id)


I don't know very much about inheritance in PostgreSQL, so I'm doing a bit of reading via Google. If anyone has recommendations on good sources re: inheritance in PostgreSQL, I'd be thankful.

Regards,

Michael Glaesemann
grzm myrealbox com


---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to