Re: Add generate_series(date,date) and generate_series(date,date,integer)

From: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Christoph Berg <myon(at)debian(dot)org>, David Fetter <david(at)fetter(dot)org>, Torsten Zuehlsdorff <mailinglists(at)toco-domains(dot)de>, Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add generate_series(date,date) and generate_series(date,date,integer)
Date: 2016-03-08 22:57:41
Message-ID: CADkLM=e3rZqWgUUZyimMOfsWK3mnti-o0pUzP+dzW99b4FnLWw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> > It would be simple enough to remove the infinity test on the "stop" and
> > leave it on the "start". Or yank both. Just waiting for others to agree
> > which checks should remain.
>
> Let's yank 'em. This is a minor issue which is distracting us from
> the main point of this patch, and I don't think it's worth getting
> distracted.
>

+1. It leaves this function consistent with the others, and if we want to
add checks later we can do them all at the same time.

>
> + <row>
> +
> <entry><literal><function>generate_series(<parameter>start</parameter>,
> <parameter>stop</parameter>, <parameter>step
> integer</parameter>)</function></literal></entry>
> + <entry><type>date</type></entry>
> + <entry><type>setof date</type></entry>
> + <entry>
> + Generate a series of values, from <parameter>start</parameter>
> to <parameter>stop</parameter>
> + with a step size of <parameter>step</parameter>
>
> I think this should be followed by the word "days" and a period.
>
>
No objections. I just followed the pattern of the other generate_series()
docs.

> + else
> + /* do when there is no more left */
> + SRF_RETURN_DONE(funcctx);
>
> I think we should drop the "else" and unindent the next two lines.
> That's the style I have seen elsewhere. Plus less indentation equals
> more happiness.
>

No objections here either. I just followed the pattern of generate_series()
for int there.

>
> I'm pretty meh about the whole idea of this function, though,
> actually, and I don't see a single clear +1 vote for this
> functionality upthread. (Apologies if I've missed one.) In the
> absence of a few of those, I recommend we reject this.
>

Just David and Vik so far. The rest were either against(Simon), meh(Robert)
or +1ed/-1ed the backpatch, leaving their thoughts on the function itself
unspoken.

Happy to make the changes above if we're moving forward with it.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2016-03-08 23:08:19 Re: Idle In Transaction Session Timeout, revived
Previous Message Joe Conway 2016-03-08 22:57:17 Re: fun with "Ready for Committer" patches