Skip to main content
Version: 1.2.0

3.26. Procedures

Procedures are almost like ordinary functions except for the fact that they can't return values as functions do. There are other essential differences, for instance, procedures can't be called as part of a DML command, instead, they must be called in isolation using the CALL command. The attributes of procedures are defined below:

AttributeDescription
LanguageThe language in which the procedure is written. There are four built-in languages available when a new model is created in pgModeler: c, internal, sql, and plpgsql. It's also possible to use user-defined languages in the procedure's definition.
SecurityThis attribute indicates the security of a procedure when called. Two values are accepted: SECURITY INVOKER and SECURITY DEFINER. The first one indicates that the procedure should be executed with the privileges of the caller user. The second value indicates that the procedure should be called with the definer's privileges.
ParametersThis tab is used to configure all parameters available for the procedure. Procedure parameters are the very same as the ones used in functions. So, refer to the function's documentation page for details about this kind of object.
Transform typesThis tab lists which transform objects a call to the procedure should apply.
DefinitionThis tab is used to configure the procedure's core definition. The fields visible in this tab may vary according to the language selected. For the c language, two fields will be visible: Symbol and Library. For any other language, the field Source Code will be visible.
SymbolThe symbol (function name) that defines the procedure in a shared library. Details about the symbol and C-based procedure can be seen inthe PostgreSQL documentation.
LibraryThe shared library file where the procedure code can be found. The value used here must be the path to the shared object file on the destination server where the procedure will be created.
Source CodeThe complete set of commands that the procedure must execute. This field is language-dependent, which means that you cannot mix commands from different languages other than the one defined in the field Language.
ConfigurationThis tab is used to define runtime configuration parameters for the functions through SET configuration_parameter = value.

References​

Procedure DDL

https://www.postgresql.org/docs/current/static/sql-createprocedure.html



Procedure details

https://www.postgresql.org/docs/current/static/xproc.html