Re: Add generate_series(numeric, numeric)

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Add generate_series(numeric, numeric)
Дата
Msg-id CAB7nPqSpV7W9r3DoUDm=yF+kPgz5TVhrwD4GU43CAqtskGPULQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add generate_series(numeric, numeric)  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: Add generate_series(numeric, numeric)  (Ali Akbar <the.apaan@gmail.com>)
Список pgsql-hackers


On Tue, Sep 30, 2014 at 10:00 AM, Michael Paquier <michael.paquier@gmail.com> wrote:


On Mon, Sep 29, 2014 at 4:19 PM, Michael Paquier <michael.paquier@gmail.com> wrote:

Michael
Btw, while looking at your patch, I actually hacked it a bit and finished with the attached:
- changed process to use NumericVar instead of Numeric
- addition of custom step values with a function generate_series(numeric,numeric,numeric)
- some cleanup and some comments here and there
That's still WIP, but feel free to use it for future work. If you are able to add documentation and regression tests to this patch, I would recommend that you register it to the next commit fest, where it would get more review, and hopefully it will get committed.
Oops, it seems that I have been too hasty here. With a fresh mind I looked at my own patch again and found two bugs:
- Incorrect initialization of step variable with const_one
- Incorrect calculation of each step's value, making stuff crash, it is necessary to switch to the context of the function to perform operations on a temporary variable first.
And here is the patch...
--
Michael
Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Add generate_series(numeric, numeric)
Следующее
От: Tom Lane
Дата:
Сообщение: Upcoming Postgres 9.4beta3 release