News for hackers. Stuff that matters.
Re:PostgreSQL's Missing DateDiff Function by michael-ax on Wednesday December 22, 2021 @06:41AM (#29648021)
one is counting distance, the other one buckets. alias the fn name to datebucketdelta to make the different problems memorable individually. :)
Re:PostgreSQL's Missing DateDiff Function by castorp on Wednesday December 22, 2021 @08:12AM (#29648829)
Well for "counting buckets" you can use `date_bin()` since Postgres 14 which groups the difference between timestamps into defined intervals.