Re: proposal: variadic argument support for least, greatest function

2019-03-11 Thread Andrew Dunstan
On 3/11/19 6:07 PM, Tom Lane wrote: > Andrew Dunstan writes: >> I'm going to mark this as rejected. Here's a possible doc patch > Maybe s/strictly/ordinary/, or some other word? "strictly" > doesn't convey much to me. Otherwise seems fine. OK, done. cheers andrew -- Andrew Dunstan

Re: proposal: variadic argument support for least, greatest function

2019-03-11 Thread David G. Johnston
On Mon, Mar 11, 2019 at 3:07 PM Tom Lane wrote: > > Andrew Dunstan writes: > > I'm going to mark this as rejected. Here's a possible doc patch > > Maybe s/strictly/ordinary/, or some other word? "strictly" > doesn't convey much to me. Otherwise seems fine. > How about: While the COALESCE,

Re: proposal: variadic argument support for least, greatest function

2019-03-11 Thread Tom Lane
Andrew Dunstan writes: > I'm going to mark this as rejected. Here's a possible doc patch Maybe s/strictly/ordinary/, or some other word? "strictly" doesn't convey much to me. Otherwise seems fine. regards, tom lane

Re: proposal: variadic argument support for least, greatest function

2019-03-11 Thread Pavel Stehule
po 11. 3. 2019 v 18:04 odesílatel David Steele napsal: > On 3/11/19 6:43 PM, Andrew Dunstan wrote: > > > > On 3/6/19 10:24 AM, Chapman Flack wrote: > >> On 3/6/19 10:12 AM, Andrew Dunstan wrote: > >> > >>> Having reviewed the thread, I'm with Andres and Tom. Maybe though we > >>> should have a

Re: proposal: variadic argument support for least, greatest function

2019-03-11 Thread David Steele
On 3/11/19 6:43 PM, Andrew Dunstan wrote: On 3/6/19 10:24 AM, Chapman Flack wrote: On 3/6/19 10:12 AM, Andrew Dunstan wrote: Having reviewed the thread, I'm with Andres and Tom. Maybe though we should have a note somewhere to the effect that you can't use VARIADIC with these. Perhaps such a

Re: proposal: variadic argument support for least, greatest function

2019-03-11 Thread Andrew Dunstan
On 3/6/19 10:24 AM, Chapman Flack wrote: > On 3/6/19 10:12 AM, Andrew Dunstan wrote: > >> Having reviewed the thread, I'm with Andres and Tom. Maybe though we >> should have a note somewhere to the effect that you can't use VARIADIC >> with these. > Perhaps such a note belongs hoisted into the

Re: proposal: variadic argument support for least, greatest function

2019-03-06 Thread Pavel Stehule
st 6. 3. 2019 v 16:24 odesílatel Chapman Flack napsal: > On 3/6/19 10:12 AM, Andrew Dunstan wrote: > > > Having reviewed the thread, I'm with Andres and Tom. Maybe though we > > should have a note somewhere to the effect that you can't use VARIADIC > > with these. > > Perhaps such a note belongs

Re: proposal: variadic argument support for least, greatest function

2019-03-06 Thread Chapman Flack
On 3/6/19 10:12 AM, Andrew Dunstan wrote: > Having reviewed the thread, I'm with Andres and Tom. Maybe though we > should have a note somewhere to the effect that you can't use VARIADIC > with these. Perhaps such a note belongs hoisted into the functions-conditional section of the manual, making

Re: proposal: variadic argument support for least, greatest function

2019-03-06 Thread Andrew Dunstan
On 3/4/19 9:39 AM, David Steele wrote: > On 3/1/19 3:59 AM, Chapman Flack wrote: >> The following review has been posted through the commitfest application: >> make installcheck-world:  tested, passed >> Implements feature:   tested, passed >> Spec compliant:   not tested >>

Re: Re: proposal: variadic argument support for least, greatest function

2019-03-04 Thread David Steele
On 3/1/19 3:59 AM, Chapman Flack wrote: The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: not tested Documentation:tested, passed For completeness, I'll

Re: proposal: variadic argument support for least, greatest function

2019-02-28 Thread Chapman Flack
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: not tested Documentation:tested, passed For completeness, I'll mark this reviewed again. It passes

Re: proposal: variadic argument support for least, greatest function

2019-02-24 Thread Pavel Stehule
so 23. 2. 2019 v 20:23 odesílatel Chapman Flack napsal: > On 02/23/19 13:35, Pavel Stehule wrote: > > please, see, attached patch > > It is getting close, for my purposes. There is still this: > > >> Can the sentence added to the doc be changed to "These functions support > >> passing parameters

Re: proposal: variadic argument support for least, greatest function

2019-02-23 Thread Chapman Flack
On 02/23/19 13:35, Pavel Stehule wrote: > please, see, attached patch It is getting close, for my purposes. There is still this: >> Can the sentence added to the doc be changed to "These functions support >> passing parameters as an array after VARIADIC >> keyword."? That is, s/supports/support/

Re: proposal: variadic argument support for least, greatest function

2019-02-23 Thread Pavel Stehule
so 23. 2. 2019 v 18:28 odesílatel Chapman Flack napsal: > On 02/23/19 01:22, Pavel Stehule wrote: > > so 23. 2. 2019 v 4:50 odesílatel Chapman Flack > > napsal: > > >> In transformMinMaxExpr: > >> The assignment of funcname doesn't look right. > > ... it still doesn't. > fixed > >> Two new

Re: proposal: variadic argument support for least, greatest function

2019-02-23 Thread Chapman Flack
On 02/23/19 01:22, Pavel Stehule wrote: > so 23. 2. 2019 v 4:50 odesílatel Chapman Flack > napsal: >> In transformMinMaxExpr: >> The assignment of funcname doesn't look right. ... it still doesn't. >> Two new errors are elogs. ... >> I am not sure if there is a way for user input to trigger

Re: proposal: variadic argument support for least, greatest function

2019-02-22 Thread Pavel Stehule
so 23. 2. 2019 v 4:50 odesílatel Chapman Flack napsal: > The following review has been posted through the commitfest application: > make installcheck-world: tested, passed > Implements feature: tested, passed > Spec compliant: not tested > Documentation:tested,

Re: proposal: variadic argument support for least, greatest function

2019-02-22 Thread Chapman Flack
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: not tested Documentation:tested, passed The latest patch provides the same functionality without growing

Re: proposal: variadic argument support for least, greatest function

2019-02-22 Thread Chapman Flack
On 02/22/19 19:31, Chapman Flack wrote: > minmax_variadic-20190222-3.patch same as -2 but for doc grammar fix > (same fix made in minmax_variadic-20190221b.patch). and naturally I didn't attach it. -Chap diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 86ff4e5c9e..aa4e80cca7

Re: proposal: variadic argument support for least, greatest function

2019-02-22 Thread Chapman Flack
On 02/22/19 14:57, Pavel Stehule wrote: > I am sending second variant (little bit longer, but the main code is not > repeated) minmax_variadic-20190222-3.patch same as -2 but for doc grammar fix (same fix made in minmax_variadic-20190221b.patch). Regards, -Chap

Re: proposal: variadic argument support for least, greatest function

2019-02-22 Thread Pavel Stehule
pá 22. 2. 2019 v 13:42 odesílatel Pavel Stehule napsal: > Hi > > čt 21. 2. 2019 v 22:05 odesílatel Tom Lane napsal: > >> Pavel Stehule writes: >> > čt 21. 2. 2019 v 3:20 odesílatel Chapman Flack >> > napsal: >> >> I am not sure I have an answer to the objections being raised on >> grounds >>

Re: proposal: variadic argument support for least, greatest function

2019-02-22 Thread Pavel Stehule
Hi čt 21. 2. 2019 v 22:05 odesílatel Tom Lane napsal: > Pavel Stehule writes: > > čt 21. 2. 2019 v 3:20 odesílatel Chapman Flack > > napsal: > >> I am not sure I have an answer to the objections being raised on grounds > >> of taste. To me, it's persuasive that GREATEST and LEAST are

Re: proposal: variadic argument support for least, greatest function

2019-02-21 Thread Chapman Flack
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: not tested Documentation:tested, passed On 02/21/19 16:04, Tom Lane wrote: > Pavel Stehule writes: >> I

Re: proposal: variadic argument support for least, greatest function

2019-02-21 Thread Chapman Flack
On 02/21/19 11:31, Pavel Stehule wrote: > I wrote doc (just one sentence) and minimal test. Both can be enhanced. Attaching minmax_variadic-20190221b.patch, identical but for s/supports/support/ and s/a/an/ in the doc. Regards, -Chap diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml

Re: proposal: variadic argument support for least, greatest function

2019-02-21 Thread Tom Lane
David Fetter writes: > On Thu, Feb 21, 2019 at 04:04:41PM -0500, Tom Lane wrote: >> I still say we should reject this and invent array_greatest/array_least >> functions instead. > Might other array_* functions of this type be in scope for this patch? Uh ... no, I wouldn't expect that. Why

Re: proposal: variadic argument support for least, greatest function

2019-02-21 Thread David Fetter
On Thu, Feb 21, 2019 at 04:04:41PM -0500, Tom Lane wrote: > I still say we should reject this and invent array_greatest/array_least > functions instead. Might other array_* functions of this type be in scope for this patch? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778

Re: proposal: variadic argument support for least, greatest function

2019-02-21 Thread Tom Lane
Pavel Stehule writes: > čt 21. 2. 2019 v 3:20 odesílatel Chapman Flack > napsal: >> I am not sure I have an answer to the objections being raised on grounds >> of taste. To me, it's persuasive that GREATEST and LEAST are described in >> the docco as functions, they are used much like variadic

Re: proposal: variadic argument support for least, greatest function

2019-02-21 Thread Pavel Stehule
Hi čt 21. 2. 2019 v 3:20 odesílatel Chapman Flack napsal: > The following review has been posted through the commitfest application: > make installcheck-world: tested, passed > Implements feature: tested, passed > Spec compliant: not tested > Documentation:not

Re: proposal: variadic argument support for least, greatest function

2019-02-20 Thread Chapman Flack
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: not tested Documentation:not tested Latest patch passes installcheck-world as of d26a810 and does what

Re: proposal: variadic argument support for least, greatest function

2019-02-12 Thread Pavel Stehule
Hi út 12. 2. 2019 v 2:00 odesílatel Chapman Flack napsal: > The following review has been posted through the commitfest application: > make installcheck-world: tested, failed > Implements feature: not tested > Spec compliant: not tested > Documentation:not tested >

Re: proposal: variadic argument support for least, greatest function

2019-01-08 Thread Pavel Stehule
st 9. 1. 2019 v 1:07 odesílatel Tom Lane napsal: > Pavel Stehule writes: > > We cannot to write > > SELECT least(VARIADIC ARRAY[1,2,3]); > > Attached patch add this possibility to least, greatest functions. > > TBH, I don't find that natural at all. If I were looking for the > functionality

Re: proposal: variadic argument support for least, greatest function

2019-01-08 Thread Tom Lane
Pavel Stehule writes: > We cannot to write > SELECT least(VARIADIC ARRAY[1,2,3]); > Attached patch add this possibility to least, greatest functions. TBH, I don't find that natural at all. If I were looking for the functionality "smallest element of an array", I think I'd expect to find that

Re: proposal: variadic argument support for least, greatest function

2018-11-10 Thread Pavel Stehule
so 10. 11. 2018 v 19:12 odesílatel Vik Fearing napsal: > On 08/11/2018 15:59, Pavel Stehule wrote: > > Hi > > > > We can pass variadic arguments as a array to any variadic function. But > > some our old variadic functions doesn't supports this feature. > > > > We cannot to write > > > > SELECT

Re: proposal: variadic argument support for least, greatest function

2018-11-10 Thread Andrew Gierth
> "Vik" == Vik Fearing writes: >> Attached patch add this possibility to least, greatest functions. Vik> Is there any particular reason you didn't just make least and Vik> greatest actual functions? least() and greatest() have some type unification logic that I don't think works for

Re: proposal: variadic argument support for least, greatest function

2018-11-10 Thread Vik Fearing
On 08/11/2018 15:59, Pavel Stehule wrote: > Hi > > We can pass variadic arguments as a array to any variadic function. But > some our old variadic functions doesn't supports this feature. > > We cannot to write > > SELECT least(VARIADIC ARRAY[1,2,3]); > > Attached patch add this possibility to