Posted On: Feb 13, 2024

Amazon Redshift announces support for the INTERVAL data type that allows you to specify periods or ranges of time, such as 12 hours, 6 weeks, or 1 month. Additionally, Redshift now supports Continue Handlers that allow you to better control the execution flow inside stored procedures. This new exception handler enables applications to handle exceptions inside a stored procedure more gracefully to simplify the programming model.

With the new INTERVAL data type support, customers can store elapsed times directly. This simplifies the user experiance as customers do not have to store two dates separately and calculate differences at query runtime. Customers use stored procedures to encapsulate logic for data transformations, validations, and business needs. Previously, if an error occurred within a stored procedure, execution was interrupted and the error returned to the caller. With Continue Handler, customers can now handle errors with custom logic in a separate transaction, and resume executing statements after the error.

Amazon Redshift support for the INTERVAL data type and Continue Handler within stored procedures is available in all AWS Regions, including the AWS GovCloud (US) Regions, where Amazon Redshift is available. See AWS Region Table for more details. To learn more about the INTERVAL data type, please visit our documentation. To learn more about the Continue Handler, please visit our documentation.