DiagramDB / Redshift SQL Validator

Redshift SQL Validator

Check Amazon Redshift SQL syntax (PostgreSQL-derived), including DISTKEY/SORTKEY table options and Redshift functions.

Amazon Redshift errors this catches, and how to fix them

  • Assuming full PostgreSQL support. Redshift is based on PostgreSQL 8.0.2. Many newer PostgreSQL features and functions are unsupported; check the AWS docs.
  • Upserts. Use MERGE (available since 2023) or the staging-table pattern; ON CONFLICT does not exist.

Need to move this query to another database? The SQL dialect converter rewrites it and lists every change. To make it readable first, use the SQL formatter.

Other dialects

MySQL Syntax Checker · PostgreSQL Syntax Checker · SQL Server Syntax Checker · SQLite Syntax Checker · MariaDB Syntax Checker · BigQuery SQL Validator · Snowflake SQL Validator · All dialects

Questions

Is this Amazon Redshift syntax checker free and private?

Yes. The Amazon Redshift grammar is downloaded once and your SQL is parsed in the browser, so nothing is uploaded. Only the optional “Explain & fix with AI” button sends the failing statement to an AI model.

Does it check that my Amazon Redshift tables and columns exist?

No. It checks syntax only, because it never connects to your database. Valid statements list the tables and columns they reference so you can compare them yourself; EXPLAIN on a development database checks the names for real.

Which Amazon Redshift versions are covered?

The grammar comes from the open-source node-sql-parser project and targets current Amazon Redshift syntax. Very new features or vendor extensions can be flagged as errors even when the server accepts them; confirm those with the official Amazon Redshift documentation.

Why does Amazon Redshift reject assuming full PostgreSQL support?

Redshift is based on PostgreSQL 8.0.2. Many newer PostgreSQL features and functions are unsupported; check the AWS docs.

Why does Amazon Redshift reject upserts?

Use MERGE (available since 2023) or the staging-table pattern; ON CONFLICT does not exist.

Related tools