Re: Remove an unnecessary errmsg_plural in dependency.c

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: alvherre(at)alvh(dot)no-ip(dot)org
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us, bharath(dot)rupireddyforpostgres(at)gmail(dot)com, peter(dot)eisentraut(at)enterprisedb(dot)com, daniel(at)yesql(dot)se, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Remove an unnecessary errmsg_plural in dependency.c
Date: 2022-03-25 01:52:46
Message-ID: 20220325.105246.179186154313984154.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Thu, 24 Mar 2022 16:00:58 +0100, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote in
> On 2022-Mar-24, Tom Lane wrote:
>
> > Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
> > > $ git grep 'Plural-Forms' src/backend/po/*.po
> > > ru.po:"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
> >
> > Oh, interesting: if I'm reading that right, all three Russian
> > forms are reachable, even with the knowledge that n > 1.
> > (But isn't the last "&& n" test redundant?)
>
> I wondered about that trailing 'n' and it turns out that the grep was
> too simplistic, so it's incomplete. The full rule is:
>
> "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
> "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"

FWIW just for fun, I saw the first form.

postgres=# drop table t cascade;
ЗАМЕЧАНИЕ: удаление распространяется на ещё 21 объект

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-03-25 01:59:08 Re: Corruption during WAL replay
Previous Message Kyotaro Horiguchi 2022-03-25 01:45:54 Re: Remove an unnecessary errmsg_plural in dependency.c