pgsql: Improve error detection/reporting in Catalog.pm and genbki.pl.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Improve error detection/reporting in Catalog.pm and genbki.pl.
Date: 2018-04-18 22:17:06
Message-ID: E1f8vNy-0003kW-PW@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Improve error detection/reporting in Catalog.pm and genbki.pl.

Clean up error messages relating to mistakes in .dat files: make sure they
provide the .dat file name and line number, not the place in the Perl
script that's reporting the problem. Adopt more uniform message phrasing,
too.

Make genbki.pl spit up on unrecognized field names in the input hashes.
Previously, it just silently ignored such fields, which could make a
misspelled field name into a very hard-to-decipher problem. (This is in
genbki.pl, *not* Catalog.pm, because we don't want reformat_dat_file.pl to
complain about unrecognized fields. We'd rather it silently dropped them,
to facilitate removing unwanted fields after a reorganization.)

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5372c2c84135be99e8df921ff228df6e7b4d3c8d

Modified Files
--------------
src/backend/catalog/Catalog.pm | 27 ++++++++++++---------------
src/backend/catalog/genbki.pl | 19 ++++++++++++++++++-
2 files changed, 30 insertions(+), 16 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Teodor Sigaev 2018-04-19 05:46:19 pgsql: Adjust INCLUDE index truncation comments and code.
Previous Message Alexander Korotkov 2018-04-18 22:03:06 Re: pgsql: Skip full index scan during cleanup of B-tree indexes when possi