mirror of
https://github.com/postgres/postgres.git
synced 2025-12-19 17:02:53 +03:00
Implement SQL-spec RETURNS TABLE syntax for functions.
(Unlike the original submission, this patch treats TABLE output parameters as being entirely equivalent to OUT parameters -- tgl) Pavel Stehule
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.441 2008/07/16 00:48:53 momjian Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.442 2008/07/18 03:32:51 tgl Exp $ -->
|
||||
|
||||
<chapter id="functions">
|
||||
<title>Functions and Operators</title>
|
||||
@@ -11563,6 +11563,14 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
|
||||
<primary>pg_get_ruledef</primary>
|
||||
</indexterm>
|
||||
|
||||
<indexterm>
|
||||
<primary>pg_get_function_arguments</primary>
|
||||
</indexterm>
|
||||
|
||||
<indexterm>
|
||||
<primary>pg_get_function_result</primary>
|
||||
</indexterm>
|
||||
|
||||
<indexterm>
|
||||
<primary>pg_get_indexdef</primary>
|
||||
</indexterm>
|
||||
@@ -11636,6 +11644,16 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
|
||||
<entry>decompile internal form of an expression, assuming that any Vars
|
||||
in it refer to the relation indicated by the second parameter</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal><function>pg_get_function_arguments</function>(<parameter>func_oid</parameter>)</literal></entry>
|
||||
<entry><type>text</type></entry>
|
||||
<entry>get argument list for function</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal><function>pg_get_function_result</function>(<parameter>func_oid</parameter>)</literal></entry>
|
||||
<entry><type>text</type></entry>
|
||||
<entry>get <literal>RETURNS</> clause for function</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal><function>pg_get_indexdef</function>(<parameter>index_oid</parameter>)</literal></entry>
|
||||
<entry><type>text</type></entry>
|
||||
@@ -11738,6 +11756,14 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
|
||||
the same result as the variant that does not have the parameter at all.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<function>pg_get_function_arguments</function> returns the argument list
|
||||
of a function, in the form it would need to appear in within
|
||||
<command>CREATE FUNCTION</>.
|
||||
<function>pg_get_function_result</function> similarly returns the
|
||||
appropriate <literal>RETURNS</> clause for the function.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<function>pg_get_serial_sequence</function> returns the name of the
|
||||
sequence associated with a column, or NULL if no sequence is associated
|
||||
|
||||
Reference in New Issue
Block a user