mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
Support "variadic" functions, which can accept a variable number of arguments
so long as all the trailing arguments are of the same (non-array) type. The function receives them as a single array argument (which is why they have to all be the same type). It might be useful to extend this facility to aggregates, but this patch doesn't do that. This patch imposes a noticeable slowdown on function lookup --- a follow-on patch will fix that by adding a redundant column to pg_proc. Pavel Stehule
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/plpgsql.sgml,v 1.131 2008/06/27 01:52:59 tgl Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/plpgsql.sgml,v 1.132 2008/07/16 01:30:21 tgl Exp $ -->
|
||||
|
||||
<chapter id="plpgsql">
|
||||
<title><application>PL/pgSQL</application> - <acronym>SQL</acronym> Procedural Language</title>
|
||||
@@ -121,6 +121,13 @@
|
||||
calling query, as discussed in <xref linkend="queries-tablefunctions">.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<application>PL/pgSQL</> functions can be declared to accept a variable
|
||||
number of arguments by using the <literal>VARIADIC</> marker. This
|
||||
works exactly the same way as for SQL functions, as discussed in
|
||||
<xref linkend="xfunc-sql-variadic-functions">.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<application>PL/pgSQL</> functions can also be declared to accept
|
||||
and return the polymorphic types
|
||||
|
||||
Reference in New Issue
Block a user