SHOW FUNCTIONS and SHOW PROCEDURES commands: Changes to output¶

Attention

This behavior change is in the 2024_01 bundle.

For the current status of the bundle, refer to Bundle History.

The output of the SHOW FUNCTIONS and SHOW PROCEDURES commands include optional arguments in the arguments column. For an example procedure:

CREATE OR REPLACE PROCEDURE my_proc (
  arg1 string,
  arg2 boolean default true
)
RETURNS string
LANGUAGE JAVASCRIPT
AS
$$
  return 'hello world';
$$;
Copy

The value in the arguments column for optional arguments is displayed as follows:

Before the change:

Optional arguments for functions and procedures are surrounded by brackets ([]).

For example, the value of the arguments column in the output of a SHOW PROCEDURES statement for the example procedure is:

MY_PROC(VARCHAR [, BOOLEAN]) RETURN VARCHAR

After the change:

Optional arguments for functions and procedures are displayed with the DEFAULT keyword.

For example, the value of the arguments column in the output of a SHOW PROCEDURES statement for the example procedure is:

MY_PROC(VARCHAR , BOOLEAN DEFAULT) RETURN VARCHAR

Snowsight correctly displays the definition of functions and procedures with optional arguments.

Ref: 1508