Re: Converting tab-complete.c's else-if chain to a switch - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Converting tab-complete.c's else-if chain to a switch
Date
Msg-id 1514995.1728256313@sss.pgh.pa.us
Whole thread Raw
In response to Re: Converting tab-complete.c's else-if chain to a switch  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: Converting tab-complete.c's else-if chain to a switch
List pgsql-hackers
Thomas Munro <thomas.munro@gmail.com> writes:
> On Sat, Jul 27, 2024 at 8:03 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I thought this version of the patch would be less subject to merge
>> conflicts than v1, but it didn't take long for somebody to break it.
>> Rebased v3 attached -- no nontrivial changes from v2.

> +1

Thanks for looking at it!

> Should we try to make sure that tab-complete.in.c remains compilable
> directly with a build mode that does that with 'cp' instead of the
> perl script?

Hmm, I should think that if you break anything in tab-complete.in.c,
the breakage would propagate to tab-complete.c without difficulty.
Do you have an example of something that the preprocessor would mask?

> One very trivial thing, where you say:
> +# where N is the replacement case label, "HeadMatch" is the original
> +# function name shorn of "es", and the rest are the function arguments.
> ... maybe simpler language: 'with "es" removed'?  (Thinking of
> non-native speakers; I understood that perfectly but I'm anglophone in
> a country overrun with sheep.)

Sure, that's changeable.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Alena Rybakina
Date:
Subject: Re: On disable_cost
Next
From: Thomas Munro
Date:
Subject: Re: Converting tab-complete.c's else-if chain to a switch