Re: date_trunc function in interval version

From: John Naylor <johncnaylorls(at)gmail(dot)com>
To: Przemysław Sztoch <przemyslaw(at)sztoch(dot)pl>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: date_trunc function in interval version
Date: 2023-12-23 00:32:31
Message-ID: CANWCAZaAAdb_J86MpSsozSpegvcHhbnDtg4-JFiajTLtUZj5QQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Dec 23, 2023 at 5:26 AM Przemysław Sztoch <przemyslaw(at)sztoch(dot)pl> wrote:
>
> In my opinion date_trunc is very good name.
> Truncated data is timestamp type, not interval.
> First parameter has same meaning in original date_trunc and in my new version.
> New version provides only more granularity.

I haven't looked at the patch, but your description sounds awfully
close to date_bin(), which already takes an arbitrary interval.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2023-12-23 00:35:22 Re: A typo in a messsage?
Previous Message Japin Li 2023-12-23 00:32:26 Re: Transaction timeout