pgsql: Simplify genbki.pl's data quoting rules.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Simplify genbki.pl's data quoting rules.
Date: 2018-04-17 22:29:26
Message-ID: E1f8Z6M-0000ji-G3@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Simplify genbki.pl's data quoting rules.

During the bootstrap data format conversion, it seemed important for
verifiability's sake that the generated postgres.bki file stayed the same
as before. That resulted in adding a bunch of ad-hoc rules about when to
quote emitted data values, to match previous manual decisions that had
often quoted values unnecessarily. Now that the conversion is complete,
it seems fine to remove all those ad-hoc rules. The net actual effect on
the current contents of postgres.bki is that some fields that had been
quoted despite containing only digits or only "-" lose their unnecessary
quotes.

Also, now that genbki.pl will always quote values containing a backslash,
there's no need for bootscanner.l to allow unquoted octal escapes;
so simplify its production for "id" by removing that possibility.

John Naylor, slightly modified by me

Discussion: https://postgr.es/m/CAJVSVGUNao=-Q2-vAN3PYcdF5tnL5JAHwGwzZGuYHtq+Mk_9ng@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e90d4ddc639aac7a7217ebc670ad6e49eaeddbf9

Modified Files
--------------
src/backend/bootstrap/bootscanner.l | 3 +--
src/backend/catalog/genbki.pl | 28 ++++++----------------------
2 files changed, 7 insertions(+), 24 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2018-04-17 23:53:56 pgsql: Rationalize handling of single and double quotes in bootstrap da
Previous Message David Rowley 2018-04-17 21:30:50 Re: pgsql: Support partition pruning at execution time