Re: idea: simple variadic functions in SQL and PL/pgSQL

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: idea: simple variadic functions in SQL and PL/pgSQL
Date: 2008-02-25 23:11:15
Message-ID: 47C34B13.2080409@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavel Stehule wrote:
> Hello,
>
> I found easy implementation of variadic functions. It's based on
> adapation FuncnameGetCandidates. When I found variadic function, then
> I should create accurate number of last arguments (diff between
> pronargs and nargs). Variadic function can be signed via flag or via
> some pseudotype. Flag is better - allows variadic arguments of any
> type. In static languages (like SQL or PL/pgSQL) variadic variables
> can ba accessed via array (variadic arguments can be only nonarray).
> This isn't problem in C language, there are arguments available
> directly.
>

There are a whole slew of questions around this, ISTM.

For example: What will be the type inferred for the array of variadic
args in plpgsql?

If we are going to do this I think we need some discussion on design
before we rush into it.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2008-02-25 23:48:11 Re: libpq.rc make rule
Previous Message Dave Page 2008-02-25 22:33:33 Re: libpq.rc make rule