1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-29 22:49:41 +03:00

Remove support for version-0 calling conventions.

The V0 convention is failure prone because we've so far assumed that a
function is V0 if PG_FUNCTION_INFO_V1 is missing, leading to crashes
if a function was coded against the V1 interface.  V0 doesn't allow
proper NULL, SRF and toast handling.  V0 doesn't offer features that
V1 doesn't.

Thus remove V0 support and obsolete fmgr README contents relating to
it.

Author: Andres Freund, with contributions by Peter Eisentraut & Craig Ringer
Reviewed-By: Peter Eisentraut, Craig Ringer
Discussion: https://postgr.es/m/20161208213441.k3mbno4twhg2qf7g@alap3.anarazel.de
This commit is contained in:
Andres Freund
2017-03-29 13:16:49 -07:00
parent 389bb2818f
commit 5ded4bd214
10 changed files with 104 additions and 909 deletions

View File

@@ -336,10 +336,10 @@ extern struct varlena *pg_detoast_datum_packed(struct varlena * datum);
/*-------------------------------------------------------------------------
* Support for detecting call convention of dynamically-loaded functions
*
* Dynamically loaded functions may use either the version-1 ("new style")
* or version-0 ("old style") calling convention. Version 1 is the call
* convention defined in this header file; version 0 is the old "plain C"
* convention. A version-1 function must be accompanied by the macro call
* Dynamically loaded functions currently can only use the version-1 ("new
* style") calling convention. Version-0 ("old style") is not supported
* anymore. Version 1 is the call convention defined in this header file, and
* must be accompanied by the macro call
*
* PG_FUNCTION_INFO_V1(function_name);
*