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'

The renewal is calculated via generate_series, when interval '00:00:00' pass to that function
query died =(

Generate dates for one time service:
test=> SELECT * FROM generate_series( '2020-11-09', '2020-11-09', INTERVAL '00:00:00' );
    generate_series
------------------------
 2020-11-09 00:00:00+02
(1 row)

Generate dates for auto-renew service:
test=> SELECT * FROM generate_series( '2020-11-09', '2020-11-10', INTERVAL '1 day' );
    generate_series    
------------------------
 2020-11-09 00:00:00+02
 2020-11-10 00:00:00+02
(2 rows)

So it is useful in my case. Also behavior is not surprising.



Wednesday, November 11, 2020, 9:17:28 PM, you wrote:


On Wed, Nov 11, 2020 at 12:12 PM Eugen Konkov <kes-kes@yandex.ru> wrote:



> So   I   feature  request  to  allow  zero size step for cases when start point is equest to finish

> What do you think?



hm....  probably  with  step 0 we always should generate series of one
value and exit, despite on finish value.
Because  with  step  0 we always stay at current position, so there is
always should be just one value.

How is this better than writing "VALUES (start date)"?

David J.



--
Best regards,
Eugen Konkov