]> granicus.if.org Git - postgresql/commit
Simplify genbki.pl's data quoting rules.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 17 Apr 2018 22:10:16 +0000 (18:10 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 17 Apr 2018 22:10:16 +0000 (18:10 -0400)
commite90d4ddc639aac7a7217ebc670ad6e49eaeddbf9
tree9e4d998ab3b1d783b3b205eaa5333c29eed77375
parentcf5a1890592bfa2f45d306789533efba97496233
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
src/backend/bootstrap/bootscanner.l
src/backend/catalog/genbki.pl