Thread: Sync timezone code with upstream release tzcode2016c

Sync timezone code with upstream release tzcode2016c

From
Tom Lane
Date:
Well, that was just about as tedious as I feared it might be, but
attached is a patch for $SUBJECT.  We should apply this, and
probably eventually back-patch it, but it'd be wise to let it
age awhile in HEAD first.  Is anyone interested in reviewing it,
or shall I just push it and see what the buildfarm thinks?

A note about comparing this to upstream: I found that the best
way to do that was to run the IANA source files through a sed
filter like this:

    sed -r \
    -e 's/^([     ]*)\*\*([     ])/\1 *\2/' \
    -e 's/^([     ]*)\*\*$/\1 */' \
    -e 's|^\*/| */|' \
    -e 's/register //g' \
    -e 's/int_fast32_t/int32/g' \
    -e 's/int_fast64_t/int64/g' \
    -e 's/struct tm\b/struct pg_tm/g' \
    -e 's/\btime_t\b/pg_time_t/g' \

and then pgindent them.  (If you pgindent without this, it'll make
a hash of their preferred block-comment format with double **'s.
As long as I had to do that, I figured I could make the filter
deal with substituting typedef names and getting rid of their
overenthusiasm for "register".)

            regards, tom lane


Attachment

Re: Sync timezone code with upstream release tzcode2016c

From
Bruce Momjian
Date:
On Sun, Mar 27, 2016 at 05:14:44PM -0400, Tom Lane wrote:
> Well, that was just about as tedious as I feared it might be, but
> attached is a patch for $SUBJECT.  We should apply this, and
> probably eventually back-patch it, but it'd be wise to let it
> age awhile in HEAD first.  Is anyone interested in reviewing it,
> or shall I just push it and see what the buildfarm thinks?
> 
> A note about comparing this to upstream: I found that the best
> way to do that was to run the IANA source files through a sed
> filter like this:
> 
>     sed -r \
>     -e 's/^([     ]*)\*\*([     ])/\1 *\2/' \
>     -e 's/^([     ]*)\*\*$/\1 */' \
>     -e 's|^\*/| */|' \
>     -e 's/register //g' \
>     -e 's/int_fast32_t/int32/g' \
>     -e 's/int_fast64_t/int64/g' \
>     -e 's/struct tm\b/struct pg_tm/g' \
>     -e 's/\btime_t\b/pg_time_t/g' \
> 
> and then pgindent them.  (If you pgindent without this, it'll make
> a hash of their preferred block-comment format with double **'s.
> As long as I had to do that, I figured I could make the filter
> deal with substituting typedef names and getting rid of their
> overenthusiasm for "register".)

Is this documented for use next time?

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com

+ As you are, so once was I. As I am, so you will be. +
+                     Ancient Roman grave inscription +



Re: Sync timezone code with upstream release tzcode2016c

From
Tom Lane
Date:
Bruce Momjian <bruce@momjian.us> writes:
> On Sun, Mar 27, 2016 at 05:14:44PM -0400, Tom Lane wrote:
>> A note about comparing this to upstream: I found that the best
>> way to do that was to run the IANA source files through a sed
>> filter like this: ...

> Is this documented for use next time?

Yes, see the README.
        regards, tom lane