Re: extend pgbench expressions with functions

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: extend pgbench expressions with functions
Дата
Msg-id alpine.DEB.2.10.1602131528150.3721@sto
обсуждение исходный текст
Ответ на Re: extend pgbench expressions with functions  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
Hello Michaël,

>>  - if the function & double stuff are separated ?
>>  - for the double part, if variables can be double ?
>
> I just double-checked and could not see a clear use case mentioned in
> this thread for double return types,

Alas there is one: non uniform random functions which use a double 
parameter.

Once random functions are there, the \setrandom horror code could be 
removed, which would be a real benefit, IMO:-)

So I see a good case to have some support for doubles.

> so I would suggest focusing on the integer portion with min(), max(), 
> abs(), debug() and the existing functions refactored. That's what your 
> first versions did. If someone is wishing to implement double types, 
> this someone could do it, the infrastructure that this patch puts in 
> place has already proved that it can be easily extended.

Adding double is not too big a deal. I just stopped at variables because I 
could not see any realistic use for them. My idea was to postpone that 
till it is actually needed, "never" being the most probable course.

Now if this is a blocker for the committer, then I will probably make 
the effort whatever I think of the usefulness of the feature.

-- 
Fabien.

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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Defaults for replication/backup
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Code cleanup in the wake of recent LWLock refactoring.