Re: date_trunc function in interval version

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Przemysław Sztoch <przemyslaw(at)sztoch(dot)pl>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: date_trunc function in interval version
Date: 2023-12-23 12:36:10
Message-ID: CAFj8pRA5F7tHGfxCf3+6XcvQDN2hzM+nFhX1t81JGfBL3Kq64A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

so 23. 12. 2023 v 13:33 odesílatel Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
napsal:

> Hi
>
> pá 22. 12. 2023 v 23:25 odesílatel Przemysław Sztoch <przemyslaw(at)sztoch(dot)pl>
> napsal:
>
>> 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.
>>
>
> ok, I miss it.
>

I was confused - I am sorry, I imagined something different. Then the name
is correct.

Regards

Pavel

>
> Pavel Stehule wrote on 12/22/2023 8:43 PM:
>
> Hi
>
> pá 22. 12. 2023 v 20:26 odesílatel Przemysław Sztoch <przemyslaw(at)sztoch(dot)pl>
> napsal:
>
>> Hello.
>> There is date_trunc(interval, timestamptz, timezone) function.
>> First parameter can be '5 year', '2 month', '6 hour', '3 hour', '15
>> minute', '10 second' etc.
>>
>
> should not be named interval_trunc instead? In this case the good name can
> be hard to choose, but with the name date_trunc it can be hard to find it.
>
> Regards
>
> Pavel
>
>
>> --
>> Przemysław Sztoch | Mobile +48 509 99 00 66
>>
>
> --
> Przemysław Sztoch | Mobile +48 509 99 00 66
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2023-12-23 12:56:29 Re: Make attstattarget nullable
Previous Message Pavel Stehule 2023-12-23 12:33:50 Re: date_trunc function in interval version