Re: small cleanup: unify scanstr() functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: John Naylor <john(dot)naylor(at)2ndquadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: small cleanup: unify scanstr() functions
Date: 2020-10-04 20:20:05
Message-ID: 1566954.1601842805@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

John Naylor <john(dot)naylor(at)2ndquadrant(dot)com> writes:
> On Thu, Oct 1, 2020 at 11:19 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-10-04 21:08:07 A modest proposal: let's add PID to assertion failure messages
Previous Message Tom Lane 2020-10-04 17:29:41 Buglets in equivclass.c