On 8/24/2016 11:29 AM, pablopumarino@gmail.com wrote:
> SELECT generate_series('2016-08-01', '2016-08-31', '1
> day'::interval)::date
>
> it gives me the corresponding list of days but for some reason it misses the
> day 2016-08-31.
> -I've tried this with other months and it works correctly, also if I use it
> for the same dates but on 2015 it works fine.
> -This started failing after we upgraded our system to the version 9.5.4,
> I've tryed it in an older release that we had installed and it worked.
I would write that as...
select generate_series(timestamp '2016-08-01', timestamp '2016-08-31',
interval '1 day')::date;
the notation type 'string value' is a native constant in that type,
while the notation 'string value'::type generates a text constant and
typecasts it.
--
john r pierce, recycling bits in santa cruz