MSC-GP0003

Returning Function Translated to Stored Procedure.

This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.

Severity

Low

Description

This warning added to CREATE FUNCTION is for information only when the language used inside is PLPGSQL and the returning type is not void.

Code Example

Input Code:

CREATE FUNCTION FOO (Param1 INTEGER)
RETURNS INTEGER
AS 
$$
    BEGIN
        RETURN 1;
    END;
$$
    LANGUAGE PLPGSQL;

Output Code:

/*** MSC-WARNING - MSC-GP0003 - RETURNING FUNCTION TRANSLATED TO STORED PROCEDURE ***/
CREATE OR REPLACE PROCEDURE FOO (Param1 INTEGER)
RETURNS INTEGER
LANGUAGE SQL
AS
$$
   BEGIN
       RETURN 1;
   END;
$$;

Recommendations

If you need more support, you can email us at snowconvert-support@snowflake.com

Last updated