Re: add modulo (%) operator to pgbench

Поиск
Список
Период
Сортировка
От Mitsumasa KONDO
Тема Re: add modulo (%) operator to pgbench
Дата
Msg-id CADupcHXh1HsKKRBOV+z=UsN6+Yci2pxo5vLysSiOSPySx-VvUQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: add modulo (%) operator to pgbench  (Fabien COELHO <coelho@cri.ensmp.fr>)
Ответы Re: add modulo (%) operator to pgbench  (Mitsumasa KONDO <kondo.mitsumasa@gmail.com>)
Список pgsql-hackers

2014-08-06 23:38 GMT+09:00 Fabien COELHO <coelho@cri.ensmp.fr>:

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.

Here is a third simpler patch which only implements the Knuth's modulo, where the remainder has the same sign as the divisor.

I would prefer this version 3 (one simple modulo based on Knuth definition) or if there is a problem version 2 (all 3 modulos). Version 1 which provides a modulo compatible with C & SQL is really useless to me.
I like version 3, it is simple and practical. And it's enough in pgbench.
If someone wants to use other implementation of modulo algorithm, he just changes his source code.

Best regards,
--
Mitsumasa KONDO

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Partitioning performance: cache stringToNode() of pg_constraint.ccbin
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: postgresql.auto.conf and reload