Re: add modulo (%) operator to pgbench

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

> At the moment I feel the patch is a bit half done. I really think that
> since the gaussian and exponential stuff was added in commit ed802e7d, that
> this should now be changed so that we have functions like random(),
> erandom() and grandom() and the way to use this becomes:

> \set name random(1,10)
> \set name erandom(1,10)
>
> And we completely pull out the new \\setrandom additions added in that
> commit. We'd likely keep \\setrandom name 1 10 for backwards compatibility.

> Does anyone else feel strongly about fixing this now, while we have the
> chance?

I thought about adding functions, possibly random, very probably abs & 
some hash, but I felt it would be more for a second round.

The other point is that although uniform random is fine, the gaussian and 
exponential ones require an additional floating point argument which means 
handling some typing.

The current patch is "just" about handling operators as before, although 
in a much nicer and extensible way, thus I would suggest to let Robert's 
patch more or less as it is, and people will be able to propose new 
extensions later on.

-- 
Fabien.



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

Предыдущее
От: Ashutosh Bapat
Дата:
Сообщение: Transactions involving multiple postgres foreign servers
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Misaligned BufferDescriptors causing major performance problems on AMD