remove quoting hacks and simplify bootscanner.l - Mailing list pgsql-hackers

From John Naylor
Subject remove quoting hacks and simplify bootscanner.l
Date
Msg-id CAJVSVGUNao=-Q2-vAN3PYcdF5tnL5JAHwGwzZGuYHtq+Mk_9ng@mail.gmail.com
Whole thread Raw
Responses Re: remove quoting hacks and simplify bootscanner.l  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: remove quoting hacks and simplify bootscanner.l  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
For the bootstrap data conversion, it was desirable for postgres.bki
to remain unchanged, so some ugly quoting hacks were added to
genbki.pl to match the quoting conventions in the DATA() lines. At
this point, it's possible (and worthwhile I think) to remove those,
and along the way simplify the tokenizing rules in bootscanner.l. This
will result in some largish changes to postgres.bki, but they're easy
to reason about and have no functional consequence. Make check passes.

Patch 0001 removes the special case rule that dashes, negative
numbers, and octals remain unquoted, so handling these cases can now
be removed from bootscanner.l as well. Change in postgres.bki: Dashes
and negative numbers will now be quoted.

Patch 0002 removes type- and attribute-specific ad-hoc quoting rules.
Change in postgres.bki: Array-like types in pg_proc that only have one
element will no longer be quoted.

Currently, Catalog.pm, genbki.pl, and bootscanner.l all have different
ideas on how to parse and format array types. Patch 0003 rips all that
out and does it once and for all in Catalog.pm. Change in
postgres.bki: Array types now look like '_foo'.

-John Naylor

Attachment

pgsql-hackers by date:

Previous
From: "Daniel Verite"
Date:
Subject: Re: Proposal: Adding json logging
Next
From: David Arnold
Date:
Subject: Re: Proposal: Adding json logging