pgsql: Add a utility function to extract variadic function arguments

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add a utility function to extract variadic function arguments
Date: 2017-10-25 12:24:18
Message-ID: E1e7KjK-0001qH-Ev@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add a utility function to extract variadic function arguments

This is epecially useful in the case or "VARIADIC ANY" functions. The
caller can get the artguments and types regardless of whether or not and
explicit VARIADIC array argument has been used. The function also
provides an option to convert arguments on type "unknown" to to "text".

Michael Paquier and me, reviewed by Tom Lane.

Backpatch to 9.4 in order to support the following json bug fix.

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/fb17082d787ec6fbd8fe850f19a58c4a0fae72b9

Modified Files
--------------
src/backend/utils/fmgr/funcapi.c | 115 ++++++++++++++++++++++++++++++++++++++-
src/include/funcapi.h | 23 ++++++++
2 files changed, 137 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2017-10-25 12:24:21 pgsql: Add a utility function to extract variadic function arguments
Previous Message Andrew Dunstan 2017-10-25 12:24:15 pgsql: Add a utility function to extract variadic function arguments