Re: Add missing function abs (interval)

From: John Naylor <john(dot)naylor(at)enterprisedb(dot)com>
To: Isaac Morland <isaac(dot)morland(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add missing function abs (interval)
Date: 2021-03-29 23:15:19
Message-ID: CAFBsxsEcgHzkOnK=X68W8NFCZH7BuHGx5ufE1dKZxxmCtuyqRw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 29, 2021 at 3:33 PM Isaac Morland <isaac(dot)morland(at)gmail(dot)com>
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, I see this attempt that you can build upon:

https://www.postgresql.org/message-id/flat/CAHE3wggpj%2Bk-zXLUdcBDRe3oahkb21pSMPDm-HzPjZxJn4vMMw%40mail.gmail.com

> If so, should I implement it essentially like the above, or as an
internal function? I've noticed that even when it seems like it might be
reasonable to implement a built-in function as an SQL function they tend to
be internal.

By default it should be internal.

--
John Naylor
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Dilger 2021-03-29 23:16:44 Re: pg_amcheck contrib application
Previous Message Amit Langote 2021-03-29 23:02:19 Re: making update/delete of inheritance trees scale better