'Default date parameter in postgres stored procedure
Is it possible to pass todays date as a default date parameter into a postgres stored procedure?
My attempt so far is:
create or replace procedure my_schema.my_procedure(InputDate date DEFAULT now())
as $$
begin
raise notice 'Input Date: %', InputDate;
end;
$$
language plpgsql;
and I am getting this error
Invalid operation: syntax error at or near "DEFAULT"
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
