Re: [HACKERS] Add numeric_trim(numeric)

2016-03-15 Thread Robert Haas
On Wed, Jan 27, 2016 at 7:09 PM, Alvaro Herrera wrote: >> Here's a patch for the second function suggested in 5643125e.1030...@joh.to. > > I think this patch got useful feedback but we never saw a followup > version posted. I closed it as returned-with-feedback. Feel

Re: [HACKERS] Add numeric_trim(numeric)

2016-01-27 Thread Alvaro Herrera
Marko Tiikkaja wrote: > Hi, > > Here's a patch for the second function suggested in 5643125e.1030...@joh.to. I think this patch got useful feedback but we never saw a followup version posted. I closed it as returned-with-feedback. Feel free to submit a new version for the 2016-03 commitfest.

Re: [HACKERS] Add numeric_trim(numeric)

2016-01-07 Thread Pavel Stehule
2016-01-07 8:12 GMT+01:00 Pavel Stehule : > > > 2016-01-07 1:11 GMT+01:00 Tom Lane : > >> Dean Rasheed writes: >> > On 6 January 2016 at 20:09, Robert Haas wrote: >> >> On Wed, Jan 6, 2016 at 10:21 AM,

Re: [HACKERS] Add numeric_trim(numeric)

2016-01-07 Thread Dean Rasheed
On 6 January 2016 at 15:21, Dean Rasheed wrote: > Actually I found the implementation a little confusing, partly because > the first comment doesn't really match the line of code that follows > it, and partly because of the complexity of the loop, the macros and >

Re: [HACKERS] Add numeric_trim(numeric)

2016-01-07 Thread Dean Rasheed
On 7 January 2016 at 00:11, Tom Lane wrote: > A different approach is that I'm not real sure why we want a function > that returns a modified numeric value at all. To the extent I understood > Marko's original use case, it seems like what you'd invariably do with the > result

Re: [HACKERS] Add numeric_trim(numeric)

2016-01-06 Thread Dean Rasheed
On 27 December 2015 at 07:11, Pavel Stehule wrote: >> 2015-11-19 3:58 GMT+01:00 Marko Tiikkaja : >>> Here's a patch for the second function suggested in >>> 5643125e.1030...@joh.to. >>> > So I am sending a review of this patch. > I took a quick look at this

Re: [HACKERS] Add numeric_trim(numeric)

2016-01-06 Thread Pavel Stehule
Hi 2016-01-06 16:21 GMT+01:00 Dean Rasheed : > On 27 December 2015 at 07:11, Pavel Stehule > wrote: > >> 2015-11-19 3:58 GMT+01:00 Marko Tiikkaja : > >>> Here's a patch for the second function suggested in > >>>

Re: [HACKERS] Add numeric_trim(numeric)

2016-01-06 Thread Tom Lane
Dean Rasheed writes: > On 6 January 2016 at 20:09, Robert Haas wrote: >> On Wed, Jan 6, 2016 at 10:21 AM, Dean Rasheed >> wrote: >>> It seems like a useful function to have, but perhaps it should just be >>> called

Re: [HACKERS] Add numeric_trim(numeric)

2016-01-06 Thread Robert Haas
On Wed, Jan 6, 2016 at 6:51 PM, Dean Rasheed wrote: > On 6 January 2016 at 20:09, Robert Haas wrote: >> On Wed, Jan 6, 2016 at 10:21 AM, Dean Rasheed >> wrote: >>> It seems like a useful function to have, but perhaps it

Re: [HACKERS] Add numeric_trim(numeric)

2016-01-06 Thread Pavel Stehule
2016-01-07 1:11 GMT+01:00 Tom Lane : > Dean Rasheed writes: > > On 6 January 2016 at 20:09, Robert Haas wrote: > >> On Wed, Jan 6, 2016 at 10:21 AM, Dean Rasheed > wrote: > >>> It seems like a useful

Re: [HACKERS] Add numeric_trim(numeric)

2016-01-06 Thread Dean Rasheed
On 6 January 2016 at 20:09, Robert Haas wrote: > On Wed, Jan 6, 2016 at 10:21 AM, Dean Rasheed > wrote: >> It seems like a useful function to have, but perhaps it should just be >> called trim() rather than numeric_trim(), for consistency with

Re: [HACKERS] Add numeric_trim(numeric)

2016-01-06 Thread Robert Haas
On Wed, Jan 6, 2016 at 10:21 AM, Dean Rasheed 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_".

Re: [HACKERS] Add numeric_trim(numeric)

2015-12-26 Thread Pavel Stehule
Hi 2015-11-19 3:58 GMT+01:00 Marko Tiikkaja : > Hi, > > Here's a patch for the second function suggested in > 5643125e.1030...@joh.to. This is my first patch trying to do anything > with numerics, so please be gentle. I'm sure it's full of stupid. > > January's commit fest,

Re: [HACKERS] Add numeric_trim(numeric)

2015-12-26 Thread Pavel Stehule
Hi 2015-12-26 21:44 GMT+01:00 Pavel Stehule : > Hi > > 2015-11-19 3:58 GMT+01:00 Marko Tiikkaja : > >> Hi, >> >> Here's a patch for the second function suggested in >> 5643125e.1030...@joh.to. This is my first patch trying to do anything >> with numerics,

[HACKERS] Add numeric_trim(numeric)

2015-11-18 Thread Marko Tiikkaja
Hi, Here's a patch for the second function suggested in 5643125e.1030...@joh.to. This is my first patch trying to do anything with numerics, so please be gentle. I'm sure it's full of stupid. January's commit fest, feedback welcome, yada yada.. .m *** a/doc/src/sgml/func.sgml ---