8 ms·
> Table inheritance is a non-starter for the stated use-case. Just don't. Can you be more specific about why you shouldn't use it like this? I've used it for s
by Deimorz 8y ago
> Table inheritance is a non-starter for the stated use-case. Just don't.
Can you be more specific about why you shouldn't use it like this? I've used it for similar cases and it's seemed to work fine. You have to declare some foreign keys / constraints that you shouldn't really need to, but it's not really any harder than creating the "child" tables from scratch anyway.
- ddebernardy 8y agoI haven't programed in years, but insofar as I can recollect one issue was foreign keys. You basically cannot have a dependable foreign key on tables with child tables. Not a useful one anyway, because the parent and child tables are treated separately. The way foreign keys are (were?) built into Postgres is using built-in system level triggers for on delete/update events. Target the wrong table and all hell breaks loose.