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

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Add generate_series(date,date) and generate_series(date,date,integer)
Дата
Msg-id CA+TgmoYOQJNe5Nh05d_Orjm9uUzriQ6OPLN7czh4hS-z0Anzkw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add generate_series(date,date) and generate_series(date,date,integer)  (Corey Huinker <corey.huinker@gmail.com>)
Ответы Re: Add generate_series(date,date) and generate_series(date,date,integer)  (Corey Huinker <corey.huinker@gmail.com>)
Re: Add generate_series(date,date) and generate_series(date,date,integer)  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
On Fri, Mar 4, 2016 at 3:17 PM, Corey Huinker <corey.huinker@gmail.com> wrote:
>>
>> I feel rather uneasy about simply removing the 'infinity' checks. Is there
>> a way to differentiate those two cases, i.e. when the generate_series is
>> called in target list and in the FROM part? If yes, we could do the check
>> only in the FROM part, which is the case that does not work (and consumes
>> arbitrary amounts of memory).
>
> 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.

+     <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.

+       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.

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.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: Re: SP-GiST support for inet datatypes
Следующее
От: Oleg Bartunov
Дата:
Сообщение: Re: SP-GiST support for inet datatypes