date_trunc invalid units with infinite value

From: Joseph Koshakow <koshy44(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: date_trunc invalid units with infinite value
Date: 2024-12-01 20:09:17
Message-ID: CAAvxfHc4084dGzEJR0_pBZkDuqbPGc5wn7gK_M0XR_kRiCdUJQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

When looking at the date_trunc function, I noticed that it wasn't
rejecting invalid units if the value was infinite. It's slightly
annoying to fix this, but we already do something very similar for
date_part. I have attached a patch that would fix this issue, let me
know if you think it's worth pursuing.

Thanks,
Joseph Koshakow

Attachment Content-Type Size
v1-0001-Fix-date_trunc-units-for-infinite-intervals.patch text/x-patch 10.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2024-12-01 20:16:07 Re: cannot to compile extension by meson on windows
Previous Message Pavel Stehule 2024-12-01 20:06:07 Re: cannot to compile extension by meson on windows