Re: Feature request: Improve allowed values for generate series

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Feature request: Improve allowed values for generate series
Дата
Msg-id CAKFQuwYS6UZTOBD6mXptTn_8dvpDQ2KpM1s94UcraX6XEtfUxw@mail.gmail.com
обсуждение исходный текст
Ответ на Feature request: Improve allowed values for generate series  (Eugen Konkov <kes-kes@yandex.ru>)
Список pgsql-hackers
On Wed, Nov 11, 2020 at 7:54 PM Eugen Konkov <kes-kes@yandex.ru> wrote:
Hello David,

I have a table with services, each service have a period. After which service is auto renewal

Services also could be one-time. At this case its interval is '00:00:00'

In which case the concept of interval is undefined - there is no meaningful "second date" here, just the one expiration date - yet you are choosing to keep it in order to introduce an artificial similarity between one-time service and auto-renewal service.  This use case isn't convincing for me.  Writing the one-time service query without generate_series leaves out extraneous stuff that isn't important, which I would recommend even if generate_series were to work as described.

If you are going to introduce code-specific stuff to make this work just write: SELECT * FROM generate_series( '2020-11-09', '2020-11-09', INTERVAL '1000 years' );  It is just as much a construction of code as the other.

David J.

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

Предыдущее
От: Dilip Kumar
Дата:
Сообщение: Re: logical streaming of xacts via test_decoding is broken
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: logical streaming of xacts via test_decoding is broken