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

From Tom Lane
Subject Re: Time to drop old-style (V0) functions?
Date
Msg-id 10773.1481236718@sss.pgh.pa.us
Whole thread Raw
In response to Time to drop old-style (V0) functions?  (Andres Freund <andres@anarazel.de>)
Responses Re: Time to drop old-style (V0) functions?  (Andres Freund <andres@anarazel.de>)
Re: [HACKERS] Time to drop old-style (V0) functions?  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Andres Freund <andres@anarazel.de> 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 to zero initialize Datums, even if
>   the corresponding isnull marker is set.
> - they allow to call arbitrary functions pretty easily

If by the first point you mean "assume V1 when no info function is found",
I object to that.  If you mean you want to require an info function, that
might be OK.

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 think we should
drop it.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Performance degradation in Bitmapscan (commit 75ae538bc3168bf44475240d4e0487ee2f3bb376)
Next
From: Tom Lane
Date:
Subject: Re: Changed SRF in targetlist handling