Re: add modulo (%) operator to pgbench

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: add modulo (%) operator to pgbench
Дата
Msg-id alpine.DEB.2.10.1409242009150.10147@sto
обсуждение исходный текст
Ответ на Re: add modulo (%) operator to pgbench  (Kevin Grittner <kgrittn@ymail.com>)
Список pgsql-hackers

> No, it depends totally on the application.  For financial and
> physical inventory purposes where I have had occasion to use it,
> the properties which were important were:
> [...]

Hmmm. Probably I'm biased towards my compiler with an integer linear 
flavor field, where C-like "%" is always a pain, however you look at it.

I'm not sure of physical inventories with negative numbers though. In 
accounting, I thought that a negative number was a positive number with 
"debit" written above. In finance, no problem to get big deficits:-)

Now about the use case, I'm not sure that you would like to write your 
financial and physical inventory stuff within a pgbench test script, 
whereas in such a script I do expect when doing a modulo with the size of 
a table to have a positive result so that I can expect to find a tuple 
there, hence the desired "positive remainder" property for negative 
dividends.

-- 
Fabien.



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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: better atomics - v0.6
Следующее
От: Andres Freund
Дата:
Сообщение: Re: better atomics - v0.6