SQL Converter · Redshift → PostgreSQL
Convert Redshift SQL to PostgreSQL
Redshift to PostgreSQL swaps GETDATE()/DATEADD for now() and intervals, and LISTAGG for STRING_AGG. A mechanical formatter only re-indents — it won’t rewrite dialect-specific syntax. The AI converter in the app translates the query and the table below shows exactly what changes.
Redshift — source
PostgreSQL — converted
What changes from Redshift to PostgreSQL
| Redshift | PostgreSQL | Why |
|---|---|---|
| LISTAGG(...) WITHIN GROUP | STRING_AGG(x, ',' ORDER BY ...) | Postgres folds the ordering into STRING_AGG. |
| DATEADD(DAY, -7, GETDATE()) | now() - INTERVAL '7 days' | Date math uses interval literals. |
| GETDATE() | now() | Current-timestamp function differs. |