Re: small cleanup: unify scanstr() functions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: small cleanup: unify scanstr() functions
Date
Msg-id 1566954.1601842805@sss.pgh.pa.us
Whole thread Raw
In response to Re: small cleanup: unify scanstr() functions  (John Naylor <john.naylor@2ndquadrant.com>)
Responses Re: small cleanup: unify scanstr() functions
List pgsql-hackers
John Naylor <john.naylor@2ndquadrant.com> writes:
> On Thu, Oct 1, 2020 at 11:19 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> In short: maybe instead of what you have here, leave GUC_scanstr()
>> alone except for a possible rename; make bootscanner.l use that;
>> and drop the now-unused scanstr().

> v2 done that way.

Pushed with very minor adjustments --- mainly, that I rewrote the commit
message to emphasize the change in postgres.bki conventions, since that
could possibly bite someone in more-surprising ways than simple removal
of a function.

> - There seem to be a few unused headers included into bootscanner.l.
> To keep "#include guc.h" from looking as strange as those, I added a
> comment. It might be worth removing those extra includes, but that's
> for another day.

I went ahead and removed everything in bootscanner.l and bootparse.y
that could be removed without provoking a compile error.  I was slightly
astonished at how many there were.  One gets the impression that there
was once a good deal of very low-level code in the bootstrap grammar.
I didn't try very hard to trace the commit history, but I did note that
almost all of the removed #includes dated to 1996 or so.  I'm surprised
they survived Bruce's occasional attempts at removing unused #includes;
maybe his script didn't check .y/.l files.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Buglets in equivclass.c
Next
From: Tom Lane
Date:
Subject: A modest proposal: let's add PID to assertion failure messages