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.”

Leader node–only functions - Amazon Redshift
This page has not been translated into your language. Request translation

Leader node–only functions

Some Amazon Redshift queries are distributed and run on the compute nodes; other queries run exclusively on the leader node.

The leader node distributes SQL to the compute nodes when a query references user-created tables or system tables (tables with an STL or STV prefix and system views with an SVL or SVV prefix). A query that references only catalog tables (tables with a PG prefix, such as PG_TABLE_DEF) or that does not reference any tables, runs exclusively on the leader node.

Some Amazon Redshift SQL functions are supported only on the leader node and are not supported on the compute nodes. A query that uses a leader-node function must run exclusively on the leader node, not on the compute nodes, or it will return an error.

The documentation for each leader-node only function includes a note stating that the function will return an error if it references user-defined tables or Amazon Redshift system tables.

For more information, see SQL functions supported on the leader node.

The following SQL functions are leader-node only functions and are not supported on the compute nodes:

System information functions

  • CURRENT_SCHEMA

  • CURRENT_SCHEMAS

  • HAS_DATABASE_PRIVILEGE

  • HAS_SCHEMA_PRIVILEGE

  • HAS_TABLE_PRIVILEGE

String functions

  • SUBSTR

Math functions

  • FACTORIAL()

The following leader-node only functions are deprecated and are no longer supported:

Date functions

  • AGE

  • CURRENT_TIME

  • CURRENT_TIMESTAMP

  • LOCALTIME

  • ISFINITE

  • NOW

String functions

  • GETBIT

  • GET_BYTE

  • SET_BIT

  • SET_BYTE

  • TO_ASCII

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