Re: Fix ALTER TABLE DROP EXPRESSION with inheritance hierarchy
| От | Tom Lane |
|---|---|
| Тема | Re: Fix ALTER TABLE DROP EXPRESSION with inheritance hierarchy |
| Дата | |
| Msg-id | 650085.1762280165@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Fix ALTER TABLE DROP EXPRESSION with inheritance hierarchy (Peter Eisentraut <peter@eisentraut.org>) |
| Ответы |
Re: Fix ALTER TABLE DROP EXPRESSION with inheritance hierarchy
|
| Список | pgsql-hackers |
Peter Eisentraut <peter@eisentraut.org> writes:
> I find that tablecmds.c uses these two arguments in not entirely
> consistent ways.
> I would have expected that if you write a command that is supposed to
> recurse (no ONLY) and you are some levels down into the recursing, then
> recursing=true, of course, but shouldn't recurse=true as well, to
> reflect the command that was written?
I think the intent was that
(1) recurse = true is an instruction to recurse down to any child
tables that may exist;
(2) recursing = true is a status flag saying we're already not at
the topmost parent table.
There is no situation where we'd recurse but only for a limited
number of levels, so I can't believe that recurse = false with
recursing = true is a valid state.
> But in ATPrepDropExpression(), when you're recursing, then recurse is
> always false. That is hardcoded in the ATPrepCmd() call in
> ATSimpleRecursion(). Does that make sense?
Seems wrong, but I didn't trace through the code.
regards, tom lane
В списке pgsql-hackers по дате отправления: