Re: [HACKERS] DROP OWNED BY doesn't work

2006-08-20 Thread Tom Lane
I found one other problem in this area, which was that REASSIGN OWNED didn't work real well either after I changed serial sequences' dependency type to AUTO. What I did about it was to make shdepReassignOwned call ATExecChangeOwner with recursing = true, which suppresses all those tedious error ch

Re: [HACKERS] DROP OWNED BY doesn't work

2006-08-19 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > What I'm considering is this: scan pg_shdepend looking for objects to > delete, and save them into a list; but each time we find one, we also > find objects that depend on it. Those dependent objects should be > ignored; but we should also remove from t

Re: [HACKERS] DROP OWNED BY doesn't work

2006-08-19 Thread Alvaro Herrera
Tom Lane wrote: > I think a correct solution probably requires making a list of all > objects to delete by scanning pg_shdepend and then starting to > delete 'em, using the list as "oktodelete" context similar to the > way that dependency.c handles auto/internal objects. What I'm considering is t

Re: [HACKERS] DROP OWNED BY doesn't work

2006-08-19 Thread Alvaro Herrera
Tom Lane wrote: > I think a correct solution probably requires making a list of all > objects to delete by scanning pg_shdepend and then starting to > delete 'em, using the list as "oktodelete" context similar to the > way that dependency.c handles auto/internal objects. Hum. I'll take a look at