]> granicus.if.org Git - postgresql/commit
pg_dump: Simplify internal archive version handling
authorPeter Eisentraut <peter_e@gmx.net>
Tue, 25 Oct 2016 16:00:00 +0000 (12:00 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Tue, 25 Oct 2016 21:02:22 +0000 (17:02 -0400)
commit8c035e55c4807dc5844f563dcbbc44ffe2fdd4d6
tree20ef5919c61e791098f344e306acf4e068c8437b
parent78d109150bf133c38bcdc6d8c5bd9ff546ed1171
pg_dump: Simplify internal archive version handling

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
src/bin/pg_dump/pg_backup_archiver.c
src/bin/pg_dump/pg_backup_archiver.h