SnowConvert AI - PostgreSQL Issues¶
Note
Conversion Scope
SnowConvert AI for PostgreSQL focuses its assessment and translation capabilities primarily on TABLES and VIEWS. While SnowConvert AI can recognize other types of ANSI-standard statements, these are not yet fully supported for conversion. This means that while the tool may identify them, it won’t perform a complete translation for these unsupported code units.
SSC-EWI-PG0001¶
Age is not supported on Snowflake
Severity¶
Medium
Description¶
This error is added because SnowConvert AI does not support the age() functionality.
Code Example¶
Input Code:¶
PostgreSQL¶
Generated Code:¶
Snowflake¶
Best Practices¶
The
Datedifftime function can solve some cases where the objective of the query is to obtain a specific range of values but this has to be handled manually for each scenario. For more information please refer to the Snowflake documentation about Datediff.If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-PG0002¶
Constraint index parameter not supported
Severity¶
Low
Description¶
The use of the following index parameters in constraints are not supported by Snowflake.
INCLUDE
WITH
USING INDEX TABLESPACE
Code Example¶
Input Code:¶
PostgreSQL¶
Generated Code:¶
Snowflake¶
Best Practices¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-PG0003¶
Inheritance not supported
Severity¶
Low
Description¶
Inheritance between tables is allowed in PostgreSQL, but Snowflake does not support it. For more information about inheritance in PostgreSQL click here.
Code Example¶
Input Code:¶
PostgreSQL¶
Generated Code:¶
Snowflake¶
Best Practices¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-PG0004¶
Exclude constraint not supported
Severity¶
Medium
Description¶
The exclude constraint used in PostgreSQL is not supported by Snowflake.
Code Example¶
Input Code:¶
PostgreSQL¶
Generated Code:¶
Snowflake¶
Best Practices¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-PG0006¶
Reference to a variable using the Label is not supported by Snowflake.
Severity¶
Medium
Description¶
This error is added when a FOR loop’s body references a variable using the label. Snowflake does not support referencing a variable using the qualified name.
Code Example¶
Input Code:¶
PostgreSQL¶
Generated Code:¶
Snowflake¶
Best Practices¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-PG0007¶
Into clause in Dynamic SQL is not support in Snowflake
Severity¶
Low
Description¶
PostgreSQL Dynamic SQL allows the INTO clause to store query results in variables. Snowflake does not support this functionality. Therefore, the INTO clause will be flagged with an EWI’.
Code Example¶
Input Code:¶
PostgreSQL¶
Generated Code:¶
Snowflake¶
Best Practices¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-PG0008¶
The use of interval within a to_char function is not compatible with Snowflake.
Severity¶
High
Description¶
The use of interval within the to_char to convert date/times data types into text is not supported in Snowflake.
Code Example¶
Input Code:¶
PostgreSQL¶
Generated Code:¶
Snowflake¶
For more information please refer to
Best Practices¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-PG0009¶
Comment on ‘Type’ is not supported by Snowflake.
Severity¶
Low
Description¶
In the original code, there are various objects that can receive comments. However, in Snowflake, several of these objects do not exist, and thus, comments cannot be assigned to them. The code for handling these scenarios is commented out to prevent any potential errors.
Code Example¶
Input Code:¶
PostgreSQL¶
Generated Code:¶
Snowflake¶
Best Practices¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-PG0010¶
Create temporary sequence is not supported by Snowflake
Severity¶
Low
Description¶
When a temporary sequence is created in PostgreSQL, it is only created for the active session and is automatically deleted when you log out of the session. However, this functionality is not available in Snowflake, so it is generated as a normal sequence. When executed, a similar sequence name may already exist, which will cause an error for an existing object.
Code Example¶
Input code:¶
PostgreSQL¶
Generated Code:¶
Snowflake¶
Best Practices¶
If you have a creation problem, you can try to rename the sequence to avoid collisions.
If you need more support, you can email us at snowconvert-support@snowflake.com.
SSC-EWI-PG0011¶
The sequence option ‘option_name’ is not supported by Snowflake.
Severity¶
Low
Description¶
Some options available in PostgreSQL for the sequence statement are not supported by Snowflake.
The unsupported options are:
Unlogged.
AS <data_type>.
MinValue.
MaxValue.
No MinValue.
No MaxValue.
Cache.
Cycle.
Owner By.
Code Example¶
Input code:¶
PostgreSQL¶
Generated Code:¶
Snowflake¶
Best Practices¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-PG0012¶
NOT VALID constraint option is not supported by Snowflake.
Description¶
The NOT VALID constraint option is used in the context of adding or altering a constraint to indicate that the constraint should be added or modified without checking the existing data for compliance with the constraint. This clause is not supported by Snowflake.
Code Example¶
Input Code:¶
PostgreSQL¶
Generated Code:¶
Snowflake¶
Best Practices¶
No additional user actions are required.
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-PG0014¶
Snowflake scripting cursors do not support fetch orientation
Severity¶
Medium
Description¶
In Snowflake, the FETCH cursor statement always fetches the next row in the cursor. When transforming the code, SnowConvert AI will transform cursor orientations that are equivalent to a FETCH NEXT as they are functionally equivalent in Snowflake, namely:
FETCH NEXTFETCH FORWARDFETCH RELATIVE 1FETCH(no orientation specified)
Any other orientation is unsupported and the FETCH statement will be marked with this EWI to reflect that.
Code Example¶
Input Code:¶
PostgreSQL¶
Generated Code:¶
Snowflake¶
Best Practices¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-PG0015¶
Fetch cursor without target variables is not supported in Snowflake
Severity¶
Medium
Description¶
In PostgreSQL, it is possible to use a FETCH statement without INTO to print on the console the values of fetched rows. However, Snowflake requires the FETCH statement to specify the INTO clause with the variables where the fetched row values are going to be stored.
Whenever a FETCH with no INTO is found in the code, SnowConvert AI will generate this EWI to notify the user that this type of FETCH is not supported.
Code Example¶
Input Code:¶
PostgreSQL¶
Generated Code:¶
Snowflake¶
Best Practices¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-PG0016¶
Bit String Type converted to Varchar Type
Severity¶
Low
Description¶
When migrating from PostgreSQL, be aware that its BIT String Types and related functions are not natively supported in Snowflake. These data types will be converted to Snowflake’s VARCHAR. This conversion means that any PostgreSQL queries or application logic that depend on bitwise operations on these columns will require significant modification to achieve the same functionality in Snowflake.
Code Example¶
Input Code:¶
PostgreSQL¶
Generated Code:¶
Snowflake¶
Best Practices¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-PG0017¶
Transformation for routine body literal is not supported.
Severity¶
Low
Description¶
SnowConvert AI does not support transformation for quoted literal routine body. Use the arrange option to modify them to dollar routine body.
Code Example¶
Input Code:¶
PostgreSQL¶
Generated Code:¶
Snowflake¶
Best Practices¶
If you need more support, you can email us at snowconvert-support@snowflake.com