Re: [HACKERS] Re: Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-20 Thread Dean Rasheed
On 16 March 2016 at 23:32, David Steele wrote: > On 3/10/16 1:24 PM, Corey Huinker wrote: > >> New patch for Alvaro's consideration. >> >> Very minor changes since the last time, the explanations below are >> literally longer than the changes: >> - Rebased,

Re: [HACKERS] Re: Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-19 Thread David Steele
On 3/17/16 11:55 AM, David G. Johnston wrote: > On Thu, Mar 17, 2016 at 8:41 AM, David Steele >wrote: > >> Not sure I agree. My point was that even if developers were pretty >> careful with their casting (or are using two actual dates) then

Re: [HACKERS] Re: Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-19 Thread Corey Huinker
On Thu, Mar 17, 2016 at 12:04 PM, Tom Lane wrote: > David Steele writes: > > On 3/17/16 11:30 AM, David G. Johnston wrote: > >> ​I'd call it "generate_dates(...)" and be done with it. > >> We would then have: > >> generate_series() > >>

Re: [HACKERS] Re: Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-19 Thread Robert Haas
On Thu, Mar 17, 2016 at 12:59 PM, Tom Lane wrote: > One idea that might be worth considering is to define the function > as generate_series(date,date,interval) returns timestamp (without > time zone). The point here would be only to move the behavior for > date inputs as far

Re: [HACKERS] Re: Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-19 Thread David Steele
On 3/17/16 4:49 AM, Dean Rasheed wrote: > On 16 March 2016 at 23:32, David Steele wrote: > >> >> I think in this case it comes down to a committer's judgement so I have >> marked this "ready for committer" and passed the buck on to Álvaro. > > So I was pretty much "meh" on

Re: [HACKERS] Re: Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-19 Thread David G. Johnston
On Thu, Mar 17, 2016 at 7:57 AM, Corey Huinker wrote: > On Thu, Mar 17, 2016 at 10:00 AM, David Steele > wrote: > >> On 3/17/16 4:49 AM, Dean Rasheed wrote: >> >> > On 16 March 2016 at 23:32, David Steele wrote: >> > >> >> >>

Re: [HACKERS] Re: Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-19 Thread Tom Lane
Robert Haas writes: > On Thu, Mar 17, 2016 at 12:59 PM, Tom Lane wrote: >> One idea that might be worth considering is to define the function >> as generate_series(date,date,interval) returns timestamp (without >> time zone). The point here would be

Re: [HACKERS] Re: Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-19 Thread David Steele
On 3/17/16 11:30 AM, David G. Johnston wrote: > On Thu, Mar 17, 2016 at 7:57 AM, Corey Huinker >wrote: > > On Thu, Mar 17, 2016 at 10:00 AM, David Steele > wrote: > > On

Re: [HACKERS] Re: Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-19 Thread Tom Lane
David Steele writes: > On 3/17/16 11:55 AM, David G. Johnston wrote: >> With the first argument casted to date it doesn't matter whether you >> cast the second argument as the pseudo-type anyelement will take its >> value from the first argument and force the second to date.

Re: [HACKERS] Re: Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-19 Thread David Steele
On 3/17/16 1:17 PM, Robert Haas wrote: > On Thu, Mar 17, 2016 at 12:59 PM, Tom Lane wrote: >> One idea that might be worth considering is to define the function >> as generate_series(date,date,interval) returns timestamp (without >> time zone). The point here would be only to

Re: [HACKERS] Re: Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-19 Thread Corey Huinker
On Thu, Mar 17, 2016 at 11:30 AM, David G. Johnston < david.g.johns...@gmail.com> wrote: > ​I'd call it "generate_dates(...)" and be done with it. > Sold. Hope to have a revised patch for you today or tomorrow.

Re: [HACKERS] Re: Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-19 Thread Corey Huinker
On Thu, Mar 17, 2016 at 10:00 AM, David Steele wrote: > On 3/17/16 4:49 AM, Dean Rasheed wrote: > > > On 16 March 2016 at 23:32, David Steele wrote: > > > >> > >> I think in this case it comes down to a committer's judgement so I have > >> marked this

Re: [HACKERS] Re: Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-18 Thread Tom Lane
David Steele writes: > On 3/17/16 11:30 AM, David G. Johnston wrote: >> ​I'd call it "generate_dates(...)" and be done with it. >> We would then have: >> generate_series() >> generate_subscripts() >> generate_dates() > To me this completely negates the idea of this "just

Re: [HACKERS] Re: Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-18 Thread David G. Johnston
On Thu, Mar 17, 2016 at 8:41 AM, David Steele wrote: > On 3/17/16 11:30 AM, David G. Johnston wrote: > > On Thu, Mar 17, 2016 at 7:57 AM, Corey Huinker > >wrote: > > > > On Thu, Mar 17, 2016 at 10:00 AM, David

Re: [HACKERS] Re: Add generate_series(date, date) and generate_series(date, date, integer)

2016-03-04 Thread David Steele
On 2/21/16 2:24 PM, Vik Fearing wrote: > On 02/21/2016 07:56 PM, Corey Huinker wrote: >> >> Other than that, the only difference is the ::date part. Is it >> really worth adding extra code just for that? I would say not. >> >> >> I would argue it belongs for the sake of completeness. > >

Re: [HACKERS] Re: Add generate_series(date, date) and generate_series(date, date, integer)

2016-02-21 Thread Vik Fearing
On 02/21/2016 07:56 PM, Corey Huinker wrote: > > Other than that, the only difference is the ::date part. Is it > really worth adding extra code just for that? I would say not. > > > I would argue it belongs for the sake of completeness. So would I. +1 for adding this missing

Re: [HACKERS] Re: Add generate_series(date, date) and generate_series(date, date, integer)

2016-02-21 Thread Corey Huinker
> > > [step] is in days, but is not documented as such. > > It is in days, and is not documented as such, but since a day is the smallest unit of time for a date, I felt there was no other interpretation. > My understanding is you want to replace this > > SELECT d.dt::date as dt > FROM

Re: [HACKERS] Re: Add generate_series(date, date) and generate_series(date, date, integer)

2016-02-20 Thread Simon Riggs
On 2 February 2016 at 18:01, Corey Huinker wrote: > Doh, I left that comment to myself in there. :) > > The corresponding structs in timestamp.c and int.c have no comment, so > suggestions of what should be there are welcome. In the interim I put in > this: > > /* state

Re: [HACKERS] Re: Add generate_series(date, date) and generate_series(date, date, integer)

2016-02-02 Thread David Steele
On 2/2/16 1:01 PM, Corey Huinker wrote: > Doh, I left that comment to myself in there. :) If I had a dime for every time I've done that... > The corresponding structs in timestamp.c and int.c have no comment, so > suggestions of what should be there are welcome. In the interim I put in > this: >

Re: [HACKERS] Re: Add generate_series(date, date) and generate_series(date, date, integer)

2016-02-02 Thread Corey Huinker
Doh, I left that comment to myself in there. :) The corresponding structs in timestamp.c and int.c have no comment, so suggestions of what should be there are welcome. In the interim I put in this: /* state for generate_series_date(date,date,[step]) */ Extra linefeed after struct removed. Do

Re: [HACKERS] Re: Add generate_series(date, date) and generate_series(date, date, integer)

2016-02-02 Thread Corey Huinker
> > > > Do you have any insight as to why the documentation test failed? > > > > In the mean time, here's the updated patch. > > I didn't pass the docs on account of the wonky comment since I consider > code comments to be part of the docs. The sgml docs build fine and look > good to me. > > Ah,