From 7a32ac8a66903de8c352735f2a26f610f5e47090 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 13 Feb 2018 10:34:04 -0500 Subject: Add procedure support to pg_get_functiondef This also makes procedures work in psql's \ef and \sf commands. Reported-by: Pavel Stehule --- doc/src/sgml/func.sgml | 8 ++++---- doc/src/sgml/ref/psql-ref.sgml | 10 ++++++---- 2 files changed, 10 insertions(+), 8 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 640ff09a7b9..4be31b082a8 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -17008,22 +17008,22 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); pg_get_functiondef(func_oid) text - get definition of a function + get definition of a function or procedure pg_get_function_arguments(func_oid) text - get argument list of function's definition (with default values) + get argument list of function's or procedure's definition (with default values) pg_get_function_identity_arguments(func_oid) text - get argument list to identify a function (without default values) + get argument list to identify a function or procedure (without default values) pg_get_function_result(func_oid) text - get RETURNS clause for function + get RETURNS clause for function (returns null for a procedure) pg_get_indexdef(index_oid) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 6f9b30b673c..8bd9b9387ec 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -1815,8 +1815,9 @@ Tue Oct 26 21:40:57 CEST 1999 - This command fetches and edits the definition of the named function, - in the form of a CREATE OR REPLACE FUNCTION command. + This command fetches and edits the definition of the named function or procedure, + in the form of a CREATE OR REPLACE FUNCTION or + CREATE OR REPLACE PROCEDURE command. Editing is done in the same way as for \edit. After the editor exits, the updated command waits in the query buffer; type semicolon or \g to send it, or \r @@ -2970,8 +2971,9 @@ testdb=> \setenv LESS -imx4F - This command fetches and shows the definition of the named function, - in the form of a CREATE OR REPLACE FUNCTION command. + This command fetches and shows the definition of the named function or procedure, + in the form of a CREATE OR REPLACE FUNCTION or + CREATE OR REPLACE PROCEDURE command. The definition is printed to the current query output channel, as set by \o. -- cgit v1.2.3