Re: Add missing function abs (interval)

2021-12-02 Thread Michael Paquier
On Fri, Nov 05, 2021 at 12:06:05AM -0400, Isaac Morland wrote: > Not yet, but thanks for the reminder. I will try to get this done on the > weekend. Seeing no updates, this has been switched to returned with feedback in the CF app. -- Michael signature.asc Description: PGP signature

Re: Add missing function abs (interval)

2021-11-04 Thread Isaac Morland
On Thu, 4 Nov 2021 at 08:08, Daniel Gustafsson wrote: > > On 26 Sep 2021, at 19:58, Isaac Morland wrote: > > > So I think I will prepare a revised patch that uses this formulation; > and if I still have any suggestions that aren't directly related to adding > abs(interval) I will split them off

Re: Add missing function abs (interval)

2021-11-04 Thread Daniel Gustafsson
> On 26 Sep 2021, at 19:58, Isaac Morland wrote: > So I think I will prepare a revised patch that uses this formulation; and if > I still have any suggestions that aren't directly related to adding > abs(interval) I will split them off into a separate discussion. This CF entry is marked Waitin

Re: Add missing function abs (interval)

2021-09-26 Thread Isaac Morland
On Sun, 26 Sept 2021 at 13:42, Tom Lane wrote: > I wrote: > > Isaac Morland writes: > >> I've attached a patch for this. Turns out there was a comment in the > source > >> explaining that there is no interval_abs because it's not clear what to > >> return; but I think it's clear that if i is an

Re: Add missing function abs (interval)

2021-09-26 Thread Tom Lane
I wrote: > Isaac Morland writes: >> I've attached a patch for this. Turns out there was a comment in the source >> explaining that there is no interval_abs because it's not clear what to >> return; but I think it's clear that if i is an interval the larger of i and >> -i should be considered to be

Re: Add missing function abs (interval)

2021-07-14 Thread Tom Lane
Isaac Morland writes: > I've attached a patch for this. Turns out there was a comment in the source > explaining that there is no interval_abs because it's not clear what to > return; but I think it's clear that if i is an interval the larger of i and > -i should be considered to be the absolute v

Re: Add missing function abs (interval)

2021-03-30 Thread Isaac Morland
I've attached a patch for this. Turns out there was a comment in the source explaining that there is no interval_abs because it's not clear what to return; but I think it's clear that if i is an interval the larger of i and -i should be considered to be the absolute value, the same as would be done

Re: Add missing function abs (interval)

2021-03-29 Thread Michael Paquier
On Mon, Mar 29, 2021 at 07:15:19PM -0400, John Naylor wrote: > Looking in the archives, I see this attempt that you can build upon: > https://www.postgresql.org/message-id/flat/CAHE3wggpj%2Bk-zXLUdcBDRe3oahkb21pSMPDm-HzPjZxJn4vMMw%40mail.gmail.com I see no problem with doing something more here.

Re: Add missing function abs (interval)

2021-03-29 Thread John Naylor
On Mon, Mar 29, 2021 at 3:33 PM Isaac Morland wrote: > > On a newly set up system there are 7 types with a unary minus operator defined, but only 6 of them have an abs function: > ... > Would a patch to add a function with this behaviour to the initial database be welcome? Looking in the archives

Add missing function abs (interval)

2021-03-29 Thread Isaac Morland
On a newly set up system there are 7 types with a unary minus operator defined, but only 6 of them have an abs function: postgres=# \df abs List of functions Schema | Name | Result data type | Argument data types | Type +--+--+-