SSC-FDM-PG0007

NULL is converted to '' and may have a different behavior in Snowflake.

Severity

Low

Description

In PostgreSQL the removal of a comment is handled by using the NULL term. However, in Snowflake, a similar method for removing a comment is to assign the value of an empty string '' to provide the same result. This approach ensures that the comment is effectively mapped to an empty string with a similar behavior.

Code Example

Input Code:

IN -> PostgreSQL_01.sql
COMMENT ON TABLE mytable IS NULL;

Output Code:

OUT -> PostgreSQL_01.sql
COMMENT ON TABLE mytable IS '' /*** SSC-FDM-PG0007 - NULL IS CONVERTED TO '' AND MAY HAVE A DIFFERENT BEHAVIOR IN SNOWFLAKE. ***/;

Recommendations

Last updated