Re: add modulo (%) operator to pgbench

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: add modulo (%) operator to pgbench
Дата
Msg-id CA+TgmoYZOEVRwGe=wzdENXRy6OmMTqeNMaNefDU8=hcdkyK3XQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: add modulo (%) operator to pgbench  (Fabien COELHO <coelho@cri.ensmp.fr>)
Ответы Re: add modulo (%) operator to pgbench  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: add modulo (%) operator to pgbench  (Fabien COELHO <coelho@cri.ensmp.fr>)
Re: add modulo (%) operator to pgbench  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers
On Mon, Aug 4, 2014 at 5:20 AM, Fabien COELHO <coelho@cri.ensmp.fr> wrote:
>> This patch is pretty trivial.
> Another slightly less trivial but more useful version.
>
> The issue is that there are 3 definitions of modulo, two of which are fine
> (Knuth floored division and Euclidian), and the last one much less useful.
> Alas, C (%) & SQL (MOD) choose the bad definition:-( I really need any of
> the other two. The attached patch adds all versions, with "%" and "mod"
> consistent with their C and SQL unfortunate counterparts, and "fmod" and
> "emod" the sane ones.

Three different modulo operators seems like a lot for a language that
doesn't even have a real expression syntax, but I'll yield to whatever
the consensus is on this one.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: B-Tree support function number 3 (strxfrm() optimization)
Следующее
От: Robert Haas
Дата:
Сообщение: Re: SSL regression test suite