Hi Hacker,
Many ALTER TABLE-related functions take two boolean parameters, "recurse"
and "recursing", whose names are easy to confuse. For example:
```
/*
* ALTER TABLE ALTER COLUMN DROP IDENTITY
*
* Return the address of the affected column.
*/
static ObjectAddress
ATExecDropIdentity(Relation rel, const char *colName, bool missing_ok,
LOCKMODE lockmode,
bool recurse, bool recursing)
```The "recurse" parameter actually indicates whether ONLY was *not* specified in the ALTER TABLE command. It’s supposed to affect both inherited tables and partitioned tables. In contrast, "recursing" is an internal indicator that only affects inherited tables. To reduce this confusion, I’m proposing to rename "recurse" to "no_only", which more directly reflects its meaning. In this patch set: * 0001 - only renames “recurse” to “no_only” together with minimum comment updates. * 0002 - performs a small mechanical refactoring, replacing “if (no_only) cmd->no_only = true” to “cmd->no_only = no_only”. Related patches are [1], [2] and [3]: [1] https://postgr.es/m/caeowx2nj71hy8r614hqr7vqhkbreo9aanpodpg0asqs74eo...@mail.gmail.com [2] https://postgr.es/m/CAEoWx2=myhcfsnhan96qqwq5b0gvs2ygo3zpvqpprd_io52...@mail.gmail.com [3] https://postgr.es/m/CAEoWx2=SLga-xH09Cq_PAvsHhQHrBK+V0vF821JKgzS=bm0...@mail.gmail.com Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/
v1-0002-tablecmds-simplify-propagation-of-no_only-flag.patch
Description: Binary data
v1-0001-tablecmds-rename-recurse-to-no_only.patch
Description: Binary data
