Re: tablecmds: clarify recurse vs recusing
| От | Ashutosh Bapat |
|---|---|
| Тема | Re: tablecmds: clarify recurse vs recusing |
| Дата | |
| Msg-id | CAExHW5s6WfMtJCTDSa6CtLnKpxNyYZV0tRko=M2PfmauNJs_vg@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: tablecmds: clarify recurse vs recusing (Peter Eisentraut <peter@eisentraut.org>) |
| Ответы |
Re: tablecmds: clarify recurse vs recusing
|
| Список | pgsql-hackers |
On Mon, Jan 19, 2026 at 9:20 PM Peter Eisentraut <peter@eisentraut.org> wrote: > > On 19.01.26 08:14, Chao Li wrote: > > Many ALTER TABLE-related functions take two boolean parameters, > > "recurse" and "recursing", whose names are easy to confuse. > > I'm not bothered by this. > +1. I had stumbled upon this when working on identity support. I had the same initial reaction that it's confusing. But soon I got used to it and any other option wasn't improving the situation. AFAIR, all the 4 possible combinations of those two booleans are possible, but I can't remember what could recurse = false, recursing = true mean. recurse = true, recursing = false happens at the start of the inheritance tree. recurse = false, recursing = false; maybe for a table which isn't part of inheritance or partition tree. recurse = true, recursing = true happens when working on a non-leaf non-root table. If we could find out the impossible combinations and then unify these two booleans into a single enum variable, that might make code clearer - at least we will know which combinations are not possible and which combinations are. -- Best Wishes, Ashutosh Bapat
В списке pgsql-hackers по дате отправления: