Re: Add operator for dividing interval by an interval

2023-05-19 Thread Andres Freund
Hi, On 2023-05-18 17:03:24 -0400, Tom Lane wrote: > Andres Freund writes: > > What about an interval / interval -> double operator that errors out > > whenever > > month is non-zero? As far as I can tell that would always be deterministic. > > We have months, days, and microseconds, and microsec

Re: Add operator for dividing interval by an interval

2023-05-18 Thread Tom Lane
Andres Freund writes: > What about an interval / interval -> double operator that errors out whenever > month is non-zero? As far as I can tell that would always be deterministic. We have months, days, and microseconds, and microseconds-per-day isn't much more stable than days-per-month (because

Add operator for dividing interval by an interval

2023-05-18 Thread Andres Freund
Hi, I've open-coded $subject many times. I wonder if we should add at least a restricted version of it. I did find one past discussion of it on the list: https://www.postgresql.org/message-id/24948.1259797531%40sss.pgh.pa.us We have workarounds for it on the wiki: https://wiki.postgresql.org/wik