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

From Thomas Munro
Subject Re: Converting tab-complete.c's else-if chain to a switch
Date
Msg-id CA+hUKGLO1-e8zL=DVFwXsOUK4t9=fjWzqUvSOSWVe8LffRR1Ag@mail.gmail.com
Whole thread Raw
In response to Re: Converting tab-complete.c's else-if chain to a switch  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Converting tab-complete.c's else-if chain to a switch
List pgsql-hackers
On Sat, Jul 27, 2024 at 8:03 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I wrote:
> > I modified the preprocessor to work like that, and I like the results
> > better than what I had.
>
> 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.
>
> I'd like to get this merged soon ...

+1

This works nicely for me and I couldn't find anything that doesn't
work as expected, the mechanism seems reasonable, etc.  I like how
it's moving slowly towards a grammar DSL.

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?

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.)



pgsql-hackers by date:

Previous
From: Alena Rybakina
Date:
Subject: Re: Add parallel columns for seq scan and index scan on pg_stat_all_tables and _indexes
Next
From: Alena Rybakina
Date:
Subject: Re: On disable_cost