Pragma
Suggest editsYou can configure EDB SPL Check's behavior inside a checked function with a pragma function. Like the pragma feature for PL/SQL or ADA languages, EDB SPL Check provides pragma functionality. EDB SPL Check detects functions named spl_check_pragma
and takes options from the parameters of the function. These EDB SPL Check options are valid to add to the end of this group of statements:
The function spl_check_pragma
is an immutable function that returns 1. It's defined by EDB SPL Check. You can declare alternative spl_check_pragma
functions like:
You can use a pragma function when declaring a part of the top block sets options on a function level:
You can also use a shorter syntax with pragmas:
Supported pragmas
echo:str
Prints the string for testing. In the string, use variables like @@id
, @@name
, or @@signature
.
status:check
, status:tracer
, status:other_warnings
, status:performance_warnings
, status:extra_warnings
, status:security_warnings
Outputs the current value.
enable:other_warnings
, enable:performance_warnings
, enable:extra_warnings
, enable:security_warnings
Enables warnings.
disable:check,disable:tracer
, disable:other_warnings
, disable:performance_warnings
, disable:extra_warnings
, disable:security_warnings
Disables the hint returning from an anyelement
function. Place the pragma before the RETURN
statement.
type:varname typename
or type:varname (fieldname type, ...)
Sets type to the record-type variable.
table: name (column_name type, ...)
or table: name (like tablename)
Creates an ephemeral temporary table. If you want to specify a schema, it allows only thepg_temp
schema.
sequence: name
Creates an ephemeral temporary sequence.
Note
Pragmas enable:tracer
and disable:tracer
are active for Postgres versions 12 and later.
- On this page
- Supported pragmas
Could this page be better? Report a problem or suggest an addition!