Thread

Commits

  1. Remove workarounds for avoiding [U]INT64_FORMAT in translatable strings.

  1. Remove INT64_FORMAT in translatable strings

    Japin Li <japinli@hotmail.com> — 2022-03-18T15:49:14Z

    Hi,
    
    I found the following lines in pg_backup_tar.c.
    
        if (len != th->fileLen)
        {
            char        buf1[32],
                        buf2[32];
    
            snprintf(buf1, sizeof(buf1), INT64_FORMAT, (int64) len);
            snprintf(buf2, sizeof(buf2), INT64_FORMAT, (int64) th->fileLen);
            fatal("actual file length (%s) does not match expected (%s)",
                  buf1, buf2);
        }
    
    we can rely on %lld/%llu and we decided to use them in translatable strings.
    See 6a1cd8b.
    
    However, I am not sure how to update the *.po files under the pg_dump/po
    directory. Any suggestions?
    
    --
    Regrads,
    Japin Li.
    ChengDu WenWu Information Technology Co.,Ltd.
    
    
  2. Re: Remove INT64_FORMAT in translatable strings

    Tom Lane <tgl@sss.pgh.pa.us> — 2022-03-18T17:12:40Z

    Japin Li <japinli@hotmail.com> writes:
    > we can rely on %lld/%llu and we decided to use them in translatable strings.
    
    Seems like good cleanup, so pushed.  I think though that project style
    is to use "long long" or "unsigned long long", without the unnecessary
    "int" --- it certainly makes little sense to do it both ways in the
    same patch.
    
    > However, I am not sure how to update the *.po files under the pg_dump/po
    > directory. Any suggestions?
    
    The translation team manages those files.  We don't normally touch them
    during code development.
    
    			regards, tom lane
    
    
    
    
  3. Re: Remove INT64_FORMAT in translatable strings

    Justin Pryzby <pryzby@telsasoft.com> — 2022-03-18T17:32:25Z

    On Fri, Mar 18, 2022 at 01:12:40PM -0400, Tom Lane wrote:
    > Japin Li <japinli@hotmail.com> writes:
    > > we can rely on %lld/%llu and we decided to use them in translatable strings.
    > 
    > Seems like good cleanup, so pushed.  I think though that project style
    > is to use "long long" or "unsigned long long", without the unnecessary
    > "int" --- it certainly makes little sense to do it both ways in the
    > same patch.
    
    This seemed familiar - it's about the same thing I sent here, while fixing
    ftello().
    
    https://www.postgresql.org/message-id/flat/20210104025321.GA9712@telsasoft.com
    0002-Fix-broken-error-message-on-unseekable-input.patch
    
    -- 
    Justin
    
    
    
    
  4. Re: Remove INT64_FORMAT in translatable strings

    Japin Li <japinli@hotmail.com> — 2022-03-18T23:40:43Z

    On Sat, 19 Mar 2022 at 01:12, Tom Lane <tgl@sss.pgh.pa.us> wrote:
    > Japin Li <japinli@hotmail.com> writes:
    >> we can rely on %lld/%llu and we decided to use them in translatable strings.
    >
    > Seems like good cleanup, so pushed.  I think though that project style
    > is to use "long long" or "unsigned long long", without the unnecessary
    > "int" --- it certainly makes little sense to do it both ways in the
    > same patch.
    >
    >> However, I am not sure how to update the *.po files under the pg_dump/po
    >> directory. Any suggestions?
    >
    > The translation team manages those files.  We don't normally touch them
    > during code development.
    >
    
    Thank you for pushing the patch.
    
    
    --
    Regrads,
    Japin Li.
    ChengDu WenWu Information Technology Co.,Ltd.