

 Amazon Redshift will no longer support the creation of new Python UDFs starting Patch 198. Existing Python UDFs will continue to function until June 30, 2026. For more information, see the [ blog post ](https://aws.amazon.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/). 

# Connecting with Amazon Redshift RSQL
<a name="rsql-query-tool"></a>

 Amazon Redshift RSQL is a command-line client for interacting with Amazon Redshift clusters and databases. You can connect to an Amazon Redshift cluster, describe database objects, query data, and view query results in various output formats. 

 Amazon Redshift RSQL supports the capabilities of the PostgreSQL psql command-line tool with an additional set of capabilities specific to Amazon Redshift. These include the following: 
+ You can use single sign-on authentication using AD FS, PingIdentity, Okta, Azure ADm or other SAML/JWT based identity providers. You can also use browser-based SAML identity providers for multi-factor authentication (MFA).
+ You can describe properties or attributes of Amazon Redshift objects such as table distribution keys, table sort keys, late-binding views (LBVs), and materialized views. You can also describe properties or attributes of external tables in an AWS Glue catalog or Apache Hive Metastore, external databases in Amazon RDS for PostgreSQL, Amazon Aurora PostgreSQL-Compatible Edition, RDS for MySQL (preview) and Amazon Aurora MySQL-Compatible Edition (preview), and tables shared by using Amazon Redshift data sharing.
+ You can also use enhanced control flow commands such as `IF` (`\ELSEIF`, `\ELSE,` `\ENDIF`), `\GOTO` and `\LABEL`.

 With Amazon Redshift RSQL batch mode, which runs a script passed as an input parameter, you can run scripts that include both SQL and complex business logic. If you have existing self-managed, on-premises data warehouses, you can use Amazon Redshift RSQL to replace existing extract, transform, load (ETL) and automation scripts, such as Teradata BTEQ scripts. Using RSQL helps you to avoid manually reimplementing scripts in a procedural language. 

 Amazon Redshift RSQL is available for Linux, Windows, and macOS X operating systems. 

To report issues for Amazon Redshift RSQL, write to redshift-rsql-support@amazon.com.

**Topics**
+ [Getting started with Amazon Redshift RSQL](rsql-query-tool-getting-started.md)
+ [Amazon Redshift RSQL change log](rsql-query-tool-changelog.md)

# Getting started with Amazon Redshift RSQL
<a name="rsql-query-tool-getting-started"></a>

Install Amazon Redshift RSQL on a computer with a Linux, macOS, or Microsoft Windows operating system.

## Download RSQL
<a name="rsql-query-tool-download"></a>
+ Linux 64-bit RPM: [RSQL Version 1.1.2](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.1.2/AmazonRedshiftRsql-1.1.2.rhel.x86_64.rpm) 
  + Linux Artifact Signature Key: [Key](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.1.2/AmazonRedshiftRsql-1.1.2-certificate.pem) 
  + Linux Artifact Signed Hash: [Hash](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.1.2/AmazonRedshiftRsql-1.1.2-signature.bin) 
+ Mac OS 64-bit PKG: [RSQL Version 1.1.2](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.1.2/AmazonRedshiftRsql-1.1.2.universal.pkg) 
+ Windows 64-bit MSI: [RSQL Version 1.1.2](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.1.2/AmazonRedshiftRsql-1.1.2.x86_64.msi) 

See the change log and downloads for previous versions at [Amazon Redshift RSQL change log](rsql-query-tool-changelog.md).

## Install RSQL for Linux
<a name="rsql-query-tool-linux-install"></a>

Follow the steps below to install RSQL for Linux.

1. Install the driver manager with the following command:

   ```
   sudo yum install unixODBC
   ```

1. Install the ODBC driver: [Downloading and installing the Amazon Redshift ODBC driverDownloading and installing the ODBC driver](odbc20-install-linux.md).

1. Copy the ini file to your home directory:

   ```
   cp /opt/amazon/redshiftodbcx64/odbc.ini ~/.odbc.ini
   ```

1. Set the environment variables to point to the location of the file:

   ```
   export ODBCINI=~/.odbc.ini
   export ODBCSYSINI=/opt/amazon/redshiftodbcx64/
   export AMAZONREDSHIFTODBCINI=/opt/amazon/redshiftodbcx64/amazon.redshiftodbc.ini
   ```

1. You can now install RSQL by running the following command.

   ```
   sudo rpm -i AmazonRedshiftRsql-<version>.rhel.x86_64.rpm
   ```

## Install RSQL for Mac
<a name="rsql-query-tool-mac-install"></a>

Follow the steps below to install RSQL for Mac OSX.

1. Install the driver manager with the following command:

   ```
   brew install unixodbc --build-from-source
   ```

1. Install the ODBC driver: [Downloading and installing the Amazon Redshift ODBC driverDownloading and installing the ODBC driver](odbc-driver-mac-how-to-install.md).

1. Copy the ini file to your home directory:

   ```
   cp /opt/amazon/redshift/Setup/odbc.ini ~/.odbc.ini
   ```

1. Set the environment variables to point to the location of the file:

   ```
   export ODBCINI=~/.odbc.ini
   export ODBCSYSINI=/opt/amazon/redshift/Setup
   export AMAZONREDSHIFTODBCINI=/opt/amazon/redshift/lib/amazon.redshiftodbc.ini
   ```

1. Set `DYLD_LIBRARY_PATH` to location of your libodbc.dylib if its not in `/usr/local/lib`.

   ```
   export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/lib
   ```

1. Double-click the pkg file to run the installer.

1. Follow the steps in the installer to complete the installation. Agree to the terms of the license agreement.

## Install RSQL for Windows
<a name="rsql-query-tool-windows-install"></a>

Follow the steps below to install RSQL for Windows.

1. Install the ODBC driver: [Downloading and installing the Amazon Redshift ODBC driverDownloading and installing the ODBC driver](odbc-driver-windows-how-to-install.md).

1. Double-click the RSQL download file to run the installer, then follow the prompts to complete the installation.

# Amazon Redshift RSQL change log
<a name="rsql-query-tool-changelog"></a>

*1.1.2 (2025-12-11)*

Bug Fixes
+ Fixed a bug that caused failures with \$1goto and \$1label commands.
+ Fixed a bug that prevented RSQL from printing variable values when variables were enclosed in quotes.
+ Fixed a bug that caused RSQL crashes when query results exceeded the ODBC DSN Fetch parameter size while UseDeclareFetch was enabled.
+ Fixed an issue where multiple pages of results are returned at once even though pager is turned on.
+ Fixed a bug that triggered RSQL crashes when queries failed within transaction blocks.

*1.1.1 (2025-11-20)*

Bug Fixes
+ Fixed an issue where RSQL incorrectly parsed queries when using the -c flag. This fix applies to all platforms.
+ Fix a bug on Mac that prevented users from using the \$1s command in RSQL.

*1.1.0 (2025-11-11)*

Bug Fixes
+ Resolved a memory leak issue that was causing unexpected crashes in rSQL.
+ Removed OpenSSL dependency from RSQL.
+ Fixed linking conflicts with libpq/psql installations in the same environment.
+ Improved platform compatibility for Amazon Linux 2023, Windows, and macOS.
+ Fixed an issue where output would be truncated when exceeding the current display size.

*1.0.8 (2023-06-19)*

Bug Fixes
+ Fixed an issue where output is truncated with SHOW commands.
+ Added support to \$1de for describing external Kinesis streams and Kafka topics.

*1.0.7 (2023-03-22)*

Bug Fixes
+ Fixed an issue where RSQL could not describe materialized views.
+ Fixed permission-denied error on stl\$1connection\$1log when using Amazon Redshift Serverless.
+ Fixed issue where RSQL may process \$1GOTO labels incorrectly.
+ Fixed issue where SSL messages are printed in quiet mode.
+ Fixed issue with random characters displayed when describing stored procedures.
+ Fixed issue with printing duplicate ERROR/INFO messages.

New
+ RSQL now gets SSL information directly from the ODBC driver.



*1.0.6 (2023-02-21)*

Bug Fixes
+ Fixed an issue where \$1d throws an error - invalid input syntax for integer: "xid" - on Redshift patch 1.0.46086 (P173).

New
+ Renamed installation files to reflect supported architecture.



*1.0.5 (2022-06-27)*

Bug Fixes
+ Send SQL error messages to standard error (stderr).
+ Fixed issue with exit codes when using ON\$1ERROR\$1STOP. Scripts now end after encountering an error and return the correct exit codes.
+ Maxerror is now case insensitive.

New
+ Added support for ODBC 2.x driver.



*1.0.4 (2022-03-19)*
+ Add support for RSPASSWORD environment variable. Set a password to connect to Amazon Redshift. For example, `export RSPASSWORD=TestPassw0rd`.



*1.0.3 (2021-12-08)*

Bug Fixes
+ Fixed dialogue pop up when using `\c` or `\logon` to switch between databases in Windows OS.
+ Fixed crash when checking ssl information.



## Amazon Redshift RSQL previous versions
<a name="rsql-query-tool-changelog-legacy-versions"></a>

Choose one of the links to download the version of Amazon Redshift RSQL you need, based on your operating system.

**Linux 64-bit RPM**
+ [RSQL Version 1.1.1](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.1.1/AmazonRedshiftRsql-1.1.1.rhel.x86_64.rpm)
+ [RSQL Version 1.1.0](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.1.0/AmazonRedshiftRsql-1.1.0.rhel.x86_64.rpm)
+ [RSQL Version 1.0.8](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.0.8/AmazonRedshiftRsql-1.0.8.x86_64.rpm)
+ [RSQL Version 1.0.7](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.0.7/AmazonRedshiftRsql-1.0.7.x86_64.rpm)
+ [RSQL Version 1.0.6](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.0.6/AmazonRedshiftRsql-1.0.6.x86_64.rpm)
+ [RSQL Version 1.0.5](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.0.5/AmazonRedshiftRsql-1.0.5-1.x86_64.rpm)
+ [RSQL Version 1.0.4](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.0.4/AmazonRedshiftRsql-1.0.4-1.x86_64.rpm)
+ [RSQL Version 1.0.3](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.0.3/AmazonRedshiftRsql-1.0.3-1.x86_64.rpm)
+ [RSQL Version 1.0.1](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.0.1/AmazonRedshiftRsql-1.0.1-1.x86_64.rpm)

**Mac OS 64-bit DMG/PKG**
+ [RSQL Version 1.1.1](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.1.1/AmazonRedshiftRsql-1.1.1.universal.pkg)
+ [RSQL Version 1.1.0](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.1.0/AmazonRedshiftRsql-1.1.0.universal.pkg)
+ [RSQL Version 1.0.8](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.0.8/AmazonRedshiftRsql-1.0.8.x86_64.dmg)
+ [RSQL Version 1.0.7](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.0.7/AmazonRedshiftRsql-1.0.7.x86_64.dmg)
+ [RSQL Version 1.0.6](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.0.6/AmazonRedshiftRsql-1.0.6.x86_64.dmg)
+ [RSQL Version 1.0.5](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.0.5/AmazonRedshiftRsql-1.0.5.dmg)
+ [RSQL Version 1.0.4](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.0.4/AmazonRedshiftRsql-1.0.4.dmg)
+ [RSQL Version 1.0.3](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.0.3/AmazonRedshiftRsql-1.0.3.dmg)
+ [RSQL Version 1.0.1](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.0.1/AmazonRedshiftRsql-1.0.1.dmg)

**Windows 64-bit MSI**
+ [RSQL Version 1.1.1](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.1.1/AmazonRedshiftRsql-1.1.1.x86_64.msi)
+ [RSQL Version 1.1.0](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.1.0/AmazonRedshiftRsql-1.1.0.x86_64.msi)
+ [RSQL Version 1.0.8](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.0.8/AmazonRedshiftRsql-1.0.8.x86_64.msi)
+ [RSQL Version 1.0.7](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.0.7/AmazonRedshiftRsql-1.0.7.x86_64.msi)
+ [RSQL Version 1.0.6](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.0.6/AmazonRedshiftRsql-1.0.6.x86_64.msi)
+ [RSQL Version 1.0.5](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.0.5/AmazonRedshiftRsql-1.0.5.msi)
+ [RSQL Version 1.0.4](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.0.4/AmazonRedshiftRsql-1.0.4.msi)
+ [RSQL Version 1.0.3](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.0.3/AmazonRedshiftRsql-1.0.3.msi)
+ [RSQL Version 1.0.1](https://s3.amazonaws.com/redshift-downloads/amazon-redshift-rsql/1.0.1/AmazonRedshiftRsql-1.0.1.msi)