Re: BUG #14294: Problem in generate series between dates
| От | John R Pierce |
|---|---|
| Тема | Re: BUG #14294: Problem in generate series between dates |
| Дата | |
| Msg-id | 56e85f55-6de8-3de6-65e6-12eca07074aa@hogranch.com обсуждение исходный текст |
| Ответ на | BUG #14294: Problem in generate series between dates (pablopumarino@gmail.com) |
| Ответы |
Re: BUG #14294: Problem in generate series between dates
|
| Список | pgsql-bugs |
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
В списке pgsql-bugs по дате отправления: