In Chapter 4, PostgreSQL Advanced Building Blocks, we discussed the following function categories: immutable, stable, and volatile. In this section, we will continue by covering other function options. These options are not PL/pgSQL language-specific.
PostgreSQL function parameters
Function authorization related parameters
The first parameters are related to security; when functions are called, they are executed within a security context that determines their privileges. The following options control the function privileges context:
- SECURITY DEFINER
- SECURITY INVOKER
The default value for this option is SECURITY INVOKER, which indicates that the function will be executed with the privileges of the user that calls it. The...