Re: [GENERAL] Strange behavior in generate_series(date, date, interval) with DST

2014-12-08 Thread Francisco Olarte
Hi Sérgio: On Sun, Dec 7, 2014 at 9:11 PM, Sérgio Saquetim wrote: > I've noticed a strange behavior in the generate_series functions. > > I'm trying to get all days between a start and an end date including the > bounds. So naturally I've tried something like the query below > ​. > As both your

Re: [GENERAL] Strange behavior in generate_series(date, date, interval) with DST

2014-12-07 Thread Andrew Sullivan
On Sun, Dec 07, 2014 at 08:25:48PM -0200, Sérgio Saquetim wrote: > > I wasn't paying attention to the fact that generate_series really expects > for timezone inputs. So when I was passing the upper bound > as '2014-10-20'::DATE, the value was being cast to 2014-10-20 00:00:00-02. > > postgres=# S

Re: [GENERAL] Strange behavior in generate_series(date, date, interval) with DST

2014-12-07 Thread Sérgio Saquetim
You've nailed it, thank you! Finally I'm understanding what's going on. I wasn't paying attention to the fact that generate_series really expects for timezone inputs. So when I was passing the upper bound as '2014-10-20'::DATE, the value was being cast to 2014-10-20 00:00:00-02. postgres=# SELEC

Re: [GENERAL] Strange behavior in generate_series(date, date, interval) with DST

2014-12-07 Thread Adrian Klaver
On 12/07/2014 12:11 PM, Sérgio Saquetim wrote: I've noticed a strange behavior in the generate_series functions. I'm trying to get all days between a start and an end date including the bounds. So naturally I've tried something like the query below ​. The real query uses generate_series to join

Re: [GENERAL] Strange behavior in generate_series(date, date, interval) with DST

2014-12-07 Thread Adrian Klaver
On 12/07/2014 12:11 PM, Sérgio Saquetim wrote: I've noticed a strange behavior in the generate_series functions. I'm trying to get all days between a start and an end date including the bounds. So naturally I've tried something like the query below ​. The real query uses generate_series to join

[GENERAL] Strange behavior in generate_series(date, date, interval) with DST

2014-12-07 Thread Sérgio Saquetim
I've noticed a strange behavior in the generate_series functions. I'm trying to get all days between a start and an end date including the bounds. So naturally I've tried something like the query below ​. The real query uses generate_series to join other tables and is much more complicated, but f