Hello,
It looks like set_config does set-to-default if it's called with second argument being null, but this is undocumented.
Please see the docs patch to fix it.
Also, SET to DEFAULT or RESET in CREATE FUNCTION is accepted but does nothing.
It wouldn't be a problem, but documentation to SET command says:
> If
SET LOCAL is used within a function that has a
SET option for the same variable (see
CREATE FUNCTION), the effects of the
SET LOCAL command disappear at function exit
This doesn't work with CREATE FUNCTION ... SET ... DEFAULT ....
What do you think of just disallowing it? Patch attached as well.
Best regards,
Alexey