Re: [BUGS] BUG #14545: Unable to retrieve parameter mode 'VARIADIC' - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: [BUGS] BUG #14545: Unable to retrieve parameter mode 'VARIADIC'
Date
Msg-id CAKFQuwYbuEk_h7NRMmaK=zRP-p+3wYTxX3uWpZy0SV=7eMh=Yw@mail.gmail.com
Whole thread Raw
In response to [BUGS] BUG #14545: Unable to retrieve parameter mode 'VARIADIC'  (ppoojari@erwin.com)
Responses Re: [BUGS] BUG #14545: Unable to retrieve parameter mode 'VARIADIC'  (Prajval Poojari <ppoojari@erwin.com>)
List pgsql-bugs
On Tue, Feb 14, 2017 at 12:11 PM, <ppoojari@erwin.com> wrote:
The following bug has been logged on the website:

Bug reference:      14545
Logged by:          Prajval Poojari
Email address:      ppoojari@erwin.com
PostgreSQL version: 9.5.6
Operating system:   Windows 10 Pro
Description:

Hi
i ran a simple select query as
"select pa.parameter_mode from information_schema as pa where
pa.parameter_mode = 'VARIADIC' "
and the DB returned me a null list.
I had already created a function with the parameter mode as VARIADIC.
Just wondering if there is some other specific way to retrieve this mode.

​I just get an error when I try that - I think you are missing the "parameters" table specification.

​CREATE FUNCTION variadictest(VARIADIC vargs text[])
RETURNS text
AS $$
SELECT 'test'::text;
$$
LANGUAGE sql;

# select data_type from information_schema.parameters WHERE specific_name ~ 'variadictest';
-> "ARRAY"

While imperfect locating any ARRAY data_type argument positioned last would be accurate if potentially imprecise (i.e., possible false positives).

There may be (probably is) a PostgreSQL-specific catalog that will contain the desired level of detail.  Information Schema is "least common denominator" in nature which may explain the lack of specificity here.

David J.

pgsql-bugs by date:

Previous
From: ppoojari@erwin.com
Date:
Subject: [BUGS] BUG #14545: Unable to retrieve parameter mode 'VARIADIC'
Next
From: Prajval Poojari
Date:
Subject: Re: [BUGS] BUG #14545: Unable to retrieve parameter mode 'VARIADIC'