public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Peter Eisentraut <[email protected]>
Cc: Chao Li <[email protected]>
Cc: Postgres hackers <[email protected]>
Subject: Re: tablecmds: clarify recurse vs recusing
Date: Mon, 19 Jan 2026 11:14:40 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CAEoWx2n9E6_zxPbqwMpaPuC1C_p4b3y635SjiDuCPSVm8GBjsA@mail.gmail.com>
	<[email protected]>

Peter Eisentraut <[email protected]> writes:
> 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.

>> To reduce this confusion, I’m proposing to rename "recurse" to 
>> "no_only", which more directly reflects its meaning.

> This seems worse.  Especially since no_only is almost a double negative.

Yeah, I don't find this change an improvement either.  I think the
actual problem here is lack of documentation: unlike many other
places, there is next to zero commentary in tablecmds.c about what
all the function parameters are.  It would probably help to define
these, along the lines of

 *  recurse: true if we should recurse to children of this table
 *  recursing: true if we are already recursing from some parent table

If we fleshed out the header comment for ATPrepCmd and maybe a few
other key functions along these lines, that would make the logic
a good deal more intelligible, I think.

			regards, tom lane






view thread (5+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: tablecmds: clarify recurse vs recusing
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox