pg_dump: Simplify internal archive version handling
pg_dump: Simplify internal archive version handling
I propose the attached patch to clean up some redundancy and confusion in pg_dump. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Re: pg_dump: Simplify internal archive version handling
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Peter Eisentraut writes: > I propose the attached patch to clean up some redundancy and confusion > in pg_dump. Looks sane, though I'd suggest coding the access macros with shifts not multiplies/divides. Since these numbers are purely internal and not stored in this form in the file, I wonder whether we shouldn't drop the rightmost zero byte, ie make it just not 00. That would save at least one divide/shift when accessing. regards, tom lane
Re: pg_dump: Simplify internal archive version handling
От:
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Дата:
On 10/13/16 9:13 AM, Tom Lane wrote: > Peter Eisentraut writes: >> I propose the attached patch to clean up some redundancy and confusion >> in pg_dump. > > Looks sane, though I'd suggest coding the access macros with shifts > not multiplies/divides. Done. > Since these numbers are purely internal and not stored in this form in the > file, I wonder whether we shouldn't drop the rightmost zero byte, ie make > it just not 00. That would save at least > one divide/shift when accessing. Done and committed. Thanks. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services