Docs/Engines/Amazon Redshift

Amazon Redshift

Redshift speaks the PostgreSQL wire protocol, but the engine diverged long ago — its version banner still reports PostgreSQL 8.0.x. DBLift drops PostgreSQL’s version-gated behaviour here and changes the SQL it generates.

type
redshift
Driver
redshift_connector
DDL
Transactional
Indexes
None

Install

pip install "dblift[redshift]"

Connection URL

redshift+redshift_connector://user:password@cluster.eu-west-1.redshift.amazonaws.com:5439/app

postgresql:// and redshift:// URLs are both accepted and normalised to redshift+redshift_connector.

dblift.yaml

database:
  type: redshift
  url: "redshift+redshift_connector://cluster.eu-west-1.redshift.amazonaws.com:5439/app"
  schema: "public"

Engine settings

KeyDefaultEffect
schemapublicThe schema DBLift reads and writes.
extra_params{}Appended to the URL query string.
options{}Also merged into the query string, after extra_params.

Behaviour notes

There is no CREATE INDEX.

Redshift uses sort keys and zone maps, so an index migration is rejected by the server — and DBLift never suggests a concurrent form.

No ON CONFLICT.

The clause was never implemented, so DBLift falls back to the portable UPDATE-then-INSERT sequence.

No JSONB.

Semi-structured data is SUPER, so a serialized JSON value binds as plain text with no cast.

PostgreSQL version gates do not apply.

Version-gated PostgreSQL semantics are switched off rather than inferred from the banner.

Snapshot storage uses VARCHAR(MAX).

The Enterprise snapshot table stores its payload in Redshift’s widest character column.