Skip to content

"Wrong number of arguments to function" when "Undefined" input arguments is checked #5404

@githubuser181226

Description

@githubuser181226

Hello.

Just noticed this.
Inside function editor, in the Input arguments section, there is a check box called Undefined.

I assume its role is to make the function requiring NO arguments when called, ie. this call is valid
SELECT function();

When I check this option Undefined the list of arguments below gets deactivated, hence my assumption the function won't take any arguments.

However, when I create a function with Undefined option CHECKED then the program returns error message
Wrong number of arguments to function

I does NOT matter if I put any or no arguments in the call, ie. both of these return this same error:
SELECT function();
SELECT function('anything');

As of now, for a function to allow argument-less calls I have to UNCHECK the Undefined option, but also leave the argument list below EMPTY.

Please, tell, if this is the intended behavior or a bug?
Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions