Re: [HACKERS] Time to drop old-style (V0) functions?

2017-03-27 Thread Tom Lane
Craig Ringer writes: > I didn't have any way to make > seg_l = (SEG *) DatumGetPointer(DirectFunctionCall2(seg_union, > PointerGetDatum(seg_l), > PointerGetDatum(sort_items[i].data))); > pretty, but *shrug*. For the builtin types,

Re: [HACKERS] Time to drop old-style (V0) functions?

2017-03-26 Thread Craig Ringer
On 27 March 2017 at 10:59, Craig Ringer wrote: > On 27 March 2017 at 10:45, Craig Ringer wrote: > >> Passes "make check" and recovery tests, check-world running now. > > A couple of fixes pending. Updated. I didn't have any way to make

Re: [HACKERS] Time to drop old-style (V0) functions?

2017-03-26 Thread Craig Ringer
On 27 March 2017 at 10:45, Craig Ringer wrote: > Passes "make check" and recovery tests, check-world running now. A couple of fixes pending. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services --

Re: [HACKERS] Time to drop old-style (V0) functions?

2017-03-26 Thread Craig Ringer
On 7 March 2017 at 22:50, Peter Eisentraut wrote: > I think we have consensus to go ahead with this, and the patches are > mostly mechanical, so I only have a few comments on style and one > possible bug below: > > >

Re: [HACKERS] Time to drop old-style (V0) functions?

2017-03-07 Thread Peter Eisentraut
I think we have consensus to go ahead with this, and the patches are mostly mechanical, so I only have a few comments on style and one possible bug below: 0001-Move-contrib-seg-to-only-use-V1-calling-conventions.patch static int restore(char *s, float val, int n); -

Re: [HACKERS] Time to drop old-style (V0) functions?

2017-03-01 Thread Andres Freund
On 2017-03-01 11:18:34 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2016-12-08 13:34:41 -0800, Andres Freund wrote: > >> Hi, > >> > >> I'm wondering if it's not time for $subject: > >> - V0 causes confusion / weird crashes when PG_FUNCTION_INFO_V1 was > >> forgotten

Re: [HACKERS] Time to drop old-style (V0) functions?

2017-03-01 Thread Tom Lane
Andres Freund writes: > On 2016-12-08 13:34:41 -0800, Andres Freund wrote: >> Hi, >> >> I'm wondering if it's not time for $subject: >> - V0 causes confusion / weird crashes when PG_FUNCTION_INFO_V1 was >> forgotten >> - They have us keep weird hacks around just for the sake

Re: [HACKERS] Time to drop old-style (V0) functions?

2017-03-01 Thread Peter Eisentraut
On 3/1/17 02:22, Andres Freund wrote: > One unaddressed question in those patches is what we do with > src/backend/utils/fmgr/README - I'm not quite sure what its purpose is, > in its current state. If we want to keep it, we'd probably have to > pretty aggressively revise it? Some of the

Re: [HACKERS] Time to drop old-style (V0) functions?

2017-02-28 Thread Andres Freund
On 2017-02-28 23:15:15 -0800, Andres Freund wrote: > On 2016-12-08 13:34:41 -0800, Andres Freund wrote: > > Hi, > > > > I'm wondering if it's not time for $subject: > > - V0 causes confusion / weird crashes when PG_FUNCTION_INFO_V1 was > > forgotten > > - They have us keep weird hacks around

Re: [HACKERS] Time to drop old-style (V0) functions?

2017-02-28 Thread Andres Freund
On 2016-12-08 13:34:41 -0800, Andres Freund wrote: > Hi, > > I'm wondering if it's not time for $subject: > - V0 causes confusion / weird crashes when PG_FUNCTION_INFO_V1 was > forgotten > - They have us keep weird hacks around just for the sake of testing V0 > - they actually cost performance,

Re: [HACKERS] Time to drop old-style (V0) functions?

2016-12-20 Thread Tom Lane
Robert Haas writes: > Well, I'm hoping there is a way to have a fast-path and a slow-path > without slowing things down too much. Seems like this discussion has veered way off into the weeds. I suggest we confine it to the stated topic; if you want to discuss ways to

Re: [HACKERS] Time to drop old-style (V0) functions?

2016-12-20 Thread Robert Haas
On Tue, Dec 20, 2016 at 8:44 AM, Andres Freund wrote: >> Advanced Server uses 256, and we had a customer complain recently that >> 256 wasn't high enough. So apparently the use case for functions with >> ridiculous numbers of arguments isn't exactly 0. > > Well, there's a

Re: [HACKERS] Time to drop old-style (V0) functions?

2016-12-20 Thread Andres Freund
On 2016-12-20 08:35:05 -0500, Robert Haas wrote: > On Tue, Dec 20, 2016 at 8:21 AM, Andres Freund wrote: > > On 2016-12-20 08:15:07 -0500, Robert Haas wrote: > >> On Tue, Dec 20, 2016 at 3:11 AM, Andres Freund wrote: > >> > I think a more efficient variant

Re: [HACKERS] Time to drop old-style (V0) functions?

2016-12-20 Thread Robert Haas
On Tue, Dec 20, 2016 at 8:21 AM, Andres Freund wrote: > On 2016-12-20 08:15:07 -0500, Robert Haas wrote: >> On Tue, Dec 20, 2016 at 3:11 AM, Andres Freund wrote: >> > I think a more efficient variant would make the function signature look >> > something

Re: [HACKERS] Time to drop old-style (V0) functions?

2016-12-20 Thread Andres Freund
On 2016-12-20 08:15:07 -0500, Robert Haas wrote: > On Tue, Dec 20, 2016 at 3:11 AM, Andres Freund wrote: > > I think a more efficient variant would make the function signature look > > something like: > > > > Datum /* directly returned argument */ > > pgfunc( > > /*

Re: [HACKERS] Time to drop old-style (V0) functions?

2016-12-20 Thread Robert Haas
On Tue, Dec 20, 2016 at 3:11 AM, Andres Freund wrote: > I think a more efficient variant would make the function signature look > something like: > > Datum /* directly returned argument */ > pgfunc( > /* extra information about function call */ >

Re: [HACKERS] Time to drop old-style (V0) functions?

2016-12-20 Thread Andres Freund
On 2016-12-20 10:44:35 +0100, Pavel Stehule wrote: > 2016-12-20 10:28 GMT+01:00 Andres Freund : > > > On 2016-12-20 01:14:10 -0800, Andres Freund wrote: > > > On 2016-12-20 09:59:43 +0100, Pavel Stehule wrote: > > > > In this case some benchmark can be very important (and

Re: [HACKERS] Time to drop old-style (V0) functions?

2016-12-20 Thread Pavel Stehule
2016-12-20 10:28 GMT+01:00 Andres Freund : > On 2016-12-20 01:14:10 -0800, Andres Freund wrote: > > On 2016-12-20 09:59:43 +0100, Pavel Stehule wrote: > > > In this case some benchmark can be very important (and interesting). I > am > > > not sure if faster function execution

Re: [HACKERS] Time to drop old-style (V0) functions?

2016-12-20 Thread Andres Freund
On 2016-12-20 01:14:10 -0800, Andres Freund wrote: > On 2016-12-20 09:59:43 +0100, Pavel Stehule wrote: > > In this case some benchmark can be very important (and interesting). I am > > not sure if faster function execution has significant benefit on Vulcano > > like executor. > > It's fairly to

Re: [HACKERS] Time to drop old-style (V0) functions?

2016-12-20 Thread Andres Freund
On 2016-12-20 09:59:43 +0100, Pavel Stehule wrote: > In this case some benchmark can be very important (and interesting). I am > not sure if faster function execution has significant benefit on Vulcano > like executor. It's fairly to see function calls as significant overhead. In fact, I moved

Re: [HACKERS] Time to drop old-style (V0) functions?

2016-12-20 Thread Pavel Stehule
2016-12-20 9:11 GMT+01:00 Andres Freund : > On 2016-12-19 15:25:42 -0500, Robert Haas wrote: > > On Mon, Dec 19, 2016 at 3:13 PM, Peter Eisentraut > > wrote: > > > On 12/9/16 7:52 AM, Robert Haas wrote: > > >> It's kind of ironic, at least

Re: [HACKERS] Time to drop old-style (V0) functions?

2016-12-20 Thread Andres Freund
On 2016-12-19 15:25:42 -0500, Robert Haas wrote: > On Mon, Dec 19, 2016 at 3:13 PM, Peter Eisentraut > wrote: > > On 12/9/16 7:52 AM, Robert Haas wrote: > >> It's kind of ironic, at least IMHO, that the DirectionFunctionCall > >> macros are anything but direct.

Re: [HACKERS] Time to drop old-style (V0) functions?

2016-12-19 Thread Robert Haas
On Mon, Dec 19, 2016 at 3:13 PM, Peter Eisentraut wrote: > On 12/9/16 7:52 AM, Robert Haas wrote: >> It's kind of ironic, at least IMHO, that the DirectionFunctionCall >> macros are anything but direct. Each one is a non-inlined function >> call that does a

Re: [HACKERS] Time to drop old-style (V0) functions?

2016-12-19 Thread Peter Eisentraut
On 12/9/16 7:52 AM, Robert Haas wrote: > It's kind of ironic, at least IMHO, that the DirectionFunctionCall > macros are anything but direct. Each one is a non-inlined function > call that does a minimum of 8 variable assignments before actually > calling the function. If this is a problem (it

Re: [HACKERS] Time to drop old-style (V0) functions?

2016-12-09 Thread Robert Haas
On Thu, Dec 8, 2016 at 5:53 PM, Andres Freund wrote: > I mean throwing an error. Silently assuming V1 seems like a horrible > idea to me. It doesn't seem unlikely that we want to introduce a new > call interface at some point given the runtime cost of the current one, > and

Re: [HACKERS] Time to drop old-style (V0) functions?

2016-12-08 Thread Andres Freund
On 2016-12-08 18:03:04 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2016-12-08 17:38:38 -0500, Tom Lane wrote: > >> The habit of zero-initializing Datums has got exactly nothing to do with > >> V0 functions; it's about ensuring consistent results and avoiding > >>

Re: [HACKERS] Time to drop old-style (V0) functions?

2016-12-08 Thread Tom Lane
Andres Freund writes: > On 2016-12-08 17:38:38 -0500, Tom Lane wrote: >> The habit of zero-initializing Datums has got exactly nothing to do with >> V0 functions; it's about ensuring consistent results and avoiding >> heisenbugs from use of uninitialized memory. I do not

Re: [HACKERS] Time to drop old-style (V0) functions?

2016-12-08 Thread Andres Freund
On 2016-12-08 14:53:58 -0800, Andres Freund wrote: > On 2016-12-08 17:38:38 -0500, Tom Lane wrote: > > The habit of zero-initializing Datums has got exactly nothing to do with > > V0 functions; it's about ensuring consistent results and avoiding > > heisenbugs from use of uninitialized memory. I

Re: [HACKERS] Time to drop old-style (V0) functions?

2016-12-08 Thread Andres Freund
On 2016-12-08 17:38:38 -0500, Tom Lane wrote: > Andres Freund writes: > > I'm wondering if it's not time for $subject: > > - V0 causes confusion / weird crashes when PG_FUNCTION_INFO_V1 was > > forgotten > > - They have us keep weird hacks around just for the sake of testing

Re: [HACKERS] Time to drop old-style (V0) functions?

2016-12-08 Thread Tom Lane
Andres Freund writes: > I'm wondering if it's not time for $subject: > - V0 causes confusion / weird crashes when PG_FUNCTION_INFO_V1 was > forgotten > - They have us keep weird hacks around just for the sake of testing V0 > - they actually cost performance, because we have

Re: [HACKERS] Time to drop old-style (V0) functions?

2016-12-08 Thread Stephen Frost
Andres, all, * Andres Freund (and...@anarazel.de) wrote: > I'm wondering if it's not time for $subject: > - V0 causes confusion / weird crashes when PG_FUNCTION_INFO_V1 was > forgotten > - They have us keep weird hacks around just for the sake of testing V0 > - they actually cost performance,