Re: Feature request: Improve allowed values for generate series

2020-11-12 Thread Eugen Konkov
Title: Re: Feature request: Improve allowed values for generate series 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 calc

Re: Feature request: Improve allowed values for generate series

2020-11-11 Thread David G. Johnston
On Wed, Nov 11, 2020 at 7:54 PM Eugen Konkov 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

Re: Feature request: Improve allowed values for generate series

2020-11-11 Thread David G. Johnston
On Wed, Nov 11, 2020 at 12:12 PM Eugen Konkov 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 fin

Re: Feature request: Improve allowed values for generate series

2020-11-11 Thread Eugen Konkov
Hello Eugen, Wednesday, November 11, 2020, 8:50:59 PM, you wrote: > Hello Pgsql-hackers, > Seems I fall into corner case: test=>> SELECT * FROM generate_series( '2020-11-09', '2020-11-09', INTERVAL '00:00:00' ); > ERROR: step size cannot equal zero > But: test=>> SELECT * FROM generate_serie

Re: Feature request: Improve allowed values for generate series

2020-11-11 Thread David G. Johnston
On Wed, Nov 11, 2020 at 11:59 AM Eugen Konkov wrote: > So I feature request to allow zero size step for cases when start > point is equest to finish > > What do you think? > I don't see how this is useful. If they are equal and you use a non-zero step you get back the one record you ar

Re: Feature request: Improve allowed values for generate series

2020-11-11 Thread Pavel Stehule
st 11. 11. 2020 v 19:59 odesílatel Eugen Konkov napsal: > Hello Pgsql-hackers, > > Seems I fall into corner case: > > test=> SELECT * FROM generate_series( '2020-11-09', '2020-11-09', INTERVAL > '00:00:00' ); > ERROR: step size cannot equal zero > > But: > test=> SELECT * FROM generate_series( '

Feature request: Improve allowed values for generate series

2020-11-11 Thread Eugen Konkov
Hello Pgsql-hackers, Seems I fall into corner case: test=> SELECT * FROM generate_series( '2020-11-09', '2020-11-09', INTERVAL '00:00:00' ); ERROR: step size cannot equal zero But: test=> SELECT * FROM generate_series( '2020-11-09', '2020-11-10', INTERVAL '1 day' ); generate_series -