Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

SET_CONFIG

Focus mode
SET_CONFIG - Amazon Redshift

Sets a configuration parameter to a new setting.

This function is equivalent to the SET command in SQL.

Syntax

SET_CONFIG('parameter', 'new_value' , is_local)

The following statement sets a session context variable to a new setting.

set_config('variable_name', 'new_value' , is_local)

Arguments

parameter

Parameter to set.

variable_name

The name of the variable to set.

new_value

New value of the parameter.

is_local

If true, parameter value applies only to the current transaction. Valid values are true or 1 and false or 0.

Return type

Returns a CHAR or VARCHAR string.

Examples

To set the value of the query_group parameter to test for the current transaction only, use the following example.

SELECT SET_CONFIG('query_group', 'test', true); +------------+ | set_config | +------------+ | test | +------------+

To set session context variables, use the following example.

SELECT SET_CONFIG(‘app.username’, ‘cuddy’, FALSE);

On this page

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.