Re: Add numeric_trim(numeric) - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Add numeric_trim(numeric)
Date
Msg-id CA+Tgmoahrc2tX-7eKfxoqSEq0B4dmHTWog7z+Y1FzLt3GQwLPA@mail.gmail.com
Whole thread Raw
In response to Re: Add numeric_trim(numeric)  (Dean Rasheed <dean.a.rasheed@gmail.com>)
List pgsql-hackers
On Wed, Jan 6, 2016 at 6:51 PM, Dean Rasheed <dean.a.rasheed@gmail.com> wrote:
> On 6 January 2016 at 20:09, Robert Haas <robertmhaas@gmail.com> wrote:
>> On Wed, Jan 6, 2016 at 10:21 AM, Dean Rasheed <dean.a.rasheed@gmail.com> wrote:
>>> It seems like a useful function to have, but perhaps it should just be
>>> called trim() rather than numeric_trim(), for consistency with the
>>> names of the other numeric functions, which don't start with
>>> "numeric_".
>>
>> That wouldn't work in this case, because we have hard-coded parser
>> productions for TRIM().
>>
>
> Ah. Good point.
>
> Pity -- I would have liked a nice short name for this, in a similar
> vein to the existing numeric functions.

My experiences with function overloading haven't been enormously
positive - things that we think will work out sometimes don't, a la
the whole pg_size_pretty mess.

In this case, trim(stringy-thingy) and trim(numberish-thingy) aren't
even really doing the same thing, which makes me even less excited
about it.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: Comment typo in namespace.c
Next
From: Michael Paquier
Date:
Subject: Re: Improving replay of XLOG_BTREE_VACUUM records