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

From Tom Lane
Subject Re: [HACKERS] Time to drop old-style (V0) functions?
Date
Msg-id 1331.1488385114@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Time to drop old-style (V0) functions?  (Andres Freund <andres@anarazel.de>)
Responses Re: [HACKERS] Time to drop old-style (V0) functions?  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Andres Freund <andres@anarazel.de> 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 of testing V0
>> - they actually cost performance, because we have to zero initialize Datums, even if
>> the corresponding isnull marker is set.
>> - they allow to call arbitrary functions pretty easily
>> 
>> I don't see any reason to keep them around. If seriously doubt anybody
>> is using them seriously in anything but error.

I find these arguments pretty weak.  In particular I don't buy your claim
that we could stop zero-initializing Datums, because I think we'd just
start getting valgrind complaints if we did.  It's too common to copy both
a Datum and its isnull flag without any particular inquiry into whether
the datum is null.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [HACKERS] Restricting maximum keep segments by repslots
Next
From: ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Date:
Subject: Re: [HACKERS] perlcritic