How to assign default value to following type of Oracle statement into PostgreSQL 9.3?
CREATE OR REPLACE FUNCTION(....
...
DECLARE
v_var Table01.column01%TYPE := 'SLOW';
BEGIN
...
...
END;
How to assign default value to following type of Oracle statement into PostgreSQL 9.3?
CREATE OR REPLACE FUNCTION(....
...
DECLARE
v_var Table01.column01%TYPE := 'SLOW';
BEGIN
...
...
END;
Postgres allows to provide parameter defaults, which kick in for missing parameters in the function call. Only allowed for parameters at the end of the list.
Example:
Syntactical shortcut would be
v_char tbl01.col01%TYPE
=
'foo'
.Call:
Details in the manual.