Tom Lane dijo: > I think we could make all these cases work if we replaced attisinherited > with *two* columns, a boolean attislocal(ly defined) and a count of > (direct) inheritances. DROP ONLY would have the effect of decrementing > the count and setting attislocal to true in each direct child; recursive > DROP would decrement the count and then drop if count is 0 *and* > attislocal is not set. At the start of a recursion, we'd allow DROP > only if count is 0 (and, presumably, attislocal is true, else the column > would not be there...).
The cases you presented are really tricky. I'll work today on the attislocal and attinhcount patch; I hope to have it ready later today for review and inclusion before beta2. -- Alvaro Herrera (<alvherre[a]atentus.com>) Officer Krupke, what are we to do? Gee, officer Krupke, Krup you! (West Side Story, "Gee, Officer Krupke") ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org