pg_dump: Simplify internal archive version handling

Enterprise / PostgreSQL - Peter Eisentraut [gmx.net] - 25 October 2016 16:02 UTC

The ArchiveHandle structure contained the archive format version number twice, once as a single field and once split into components. Simplify that by just keeping the single field and adding some macros to extract the components. Introduce some macros for composing version numbers, to eliminate the repeated use of magic formulas. Drop the unused trailing zero byte from the run-time composite version representation.

reviewed by Tom Lane

8c035e5 pg_dump: Simplify internal archive version handling
src/bin/pg_dump/pg_backup_archiver.c | 52 +++++++++++++++----------------
src/bin/pg_dump/pg_backup_archiver.h | 56 +++++++++++++++++-----------------
2 files changed, 53 insertions(+), 55 deletions(-)

Upstream: git.postgresql.org


  • Share