跳至內容

Is the "IS DISTINCT FROM" operator officially supported in Redshift?

0

The Unsupported PostgreSQL Functions page lists IS DISTINCT FROM as unsupported. However, it appears to work correctly on Redshift:

SELECT NULL IS DISTINCT FROM 1;
-- Returns: TRUE

I have also verified it handles various cases as expected (NULL vs NULL, NULL vs value, value vs value). Could someone from the Redshift team clarify:

  1. Is this operator now officially supported and the documentation simply outdated?
  2. Or is this an undocumented behavior that may be removed in a future release?

This distinction matters for production workloads - I'd like to confirm it's safe to rely on before adopting it.

已提問 2 個月前檢視次數 117 次
1 個回答
1

Based on the official documentation, IS DISTINCT FROM is listed as an unsupported PostgreSQL function in Amazon Redshift. While you've observed that the operator appears to work in your current Redshift version (1.0.239402), the documentation explicitly categorizes it among unsupported features.

Given that it's officially documented as unsupported, I would advise caution in relying on this operator for production workloads. Even though it may currently function as expected, there are a few important considerations:

  1. The behavior could be undocumented and subject to change in future releases without notice
  2. It may not be fully tested or supported across all Redshift configurations and scenarios
  3. AWS support may not be able to assist with issues related to officially unsupported features

For production environments, it's generally safer to use alternative approaches that are officially documented and supported. You might consider using equivalent logic with CASE statements or other supported comparison operators combined with NULL handling functions to achieve the same result.

If you need definitive clarification on whether this represents a documentation gap or truly unsupported functionality, I'd recommend opening a support case with AWS or posting in the AWS forums where Redshift team members can provide an official response about the roadmap for this feature.

It's worth noting that Amazon Redshift is built on industry-standard SQL but has differences from PostgreSQL, and the documentation emphasizes not assuming that elements common to both systems have identical semantics.
Sources
Unsupported PostgreSQL functions - Amazon Redshift
Amazon Redshift SQL - Amazon Redshift
Unsupported PostgreSQL features - Amazon Redshift

已回答 2 個月前
AWS
支援工程師
已審閱 2 個月前
專家
已審閱 2 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。