| From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
|---|---|
| To: | Eugen Konkov <kes-kes(at)yandex(dot)ru> |
| Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Feature request: Improve allowed values for generate series |
| Date: | 2020-11-12 06:08:03 |
| Message-ID: | CAKFQuwYS6UZTOBD6mXptTn_8dvpDQ2KpM1s94UcraX6XEtfUxw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Nov 11, 2020 at 7:54 PM Eugen Konkov <kes-kes(at)yandex(dot)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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Amit Kapila | 2020-11-12 06:08:06 | Re: logical streaming of xacts via test_decoding is broken |
| Previous Message | Dilip Kumar | 2020-11-12 05:59:39 | Re: logical streaming of xacts via test_decoding is broken |