DDC-2449: Amazon Redshift Support #3071

Closed
opened 2026-01-22 14:11:22 +01:00 by admin · 4 comments
Owner

Originally created by @doctrinebot on GitHub (May 15, 2013).

Originally assigned to: @Ocramius on GitHub.

Jira issue originally created by user kfuchs:

It would be nice to get doctrine compatible with Amazon Redshift. It uses a Postgres connector but there are some differences. I'm currently facing an issue with the primary id, in Redshift the generation of an id is different from Postgres and so I'm getting errors associated with generating an id.

Here are some references that might be useful:
node-orm faced the same issue and seems like they figured it out: https://github.com/dresende/node-orm2/issues/39

Amazon Manual:
http://awsdocs.s3.amazonaws.com/redshift/latest/redshift-dg.pdf

Originally created by @doctrinebot on GitHub (May 15, 2013). Originally assigned to: @Ocramius on GitHub. Jira issue originally created by user kfuchs: It would be nice to get doctrine compatible with Amazon Redshift. It uses a Postgres connector but there are some differences. I'm currently facing an issue with the primary id, in Redshift the generation of an id is different from Postgres and so I'm getting errors associated with generating an id. Here are some references that might be useful: node-orm faced the same issue and seems like they figured it out: https://github.com/dresende/node-orm2/issues/39 Amazon Manual: http://awsdocs.s3.amazonaws.com/redshift/latest/redshift-dg.pdf
admin added the New FeatureWon't Fix labels 2026-01-22 14:11:22 +01:00
admin closed this issue 2026-01-22 14:11:23 +01:00
Author
Owner

@garethlawson commented on GitHub (Sep 20, 2016):

Hi guys,

Is there any intention to support Amazon Redshift? It looks like they resolved the major issue in NodeORM by extending the Postgres driver and overriding the method for INSERTs to do a SELECT LASTVAL() AS id query to get the ID of the last INSERT operation instead of using the standard Postgres sequencing functions. Seems like a fairly trivial change, but looking at the list of Postgres functions that are not supported and thinking on the complexity of Doctrine, even from my limited knowledge, I have a feeling it is not all that simple. It may fix the most obvious issue and enable Doctrine to successfully execute basic SQL operations like INSERTs, but there may be other less basic functionality in Doctrine that will also fail.

That said, I will review the requirement for contributing to the Doctrine project and will try to make the time to contribute a PR for this. I may have a project using Doctrine as an ORM that would benefit from Redshift support.

Thanks,
Gareth

@garethlawson commented on GitHub (Sep 20, 2016): Hi guys, Is there any intention to support Amazon Redshift? It looks like they resolved the major issue in NodeORM by extending the Postgres driver and overriding the method for INSERTs to do a `SELECT LASTVAL() AS id` query to get the ID of the last INSERT operation instead of using the standard Postgres sequencing functions. Seems like a fairly trivial change, but looking at the list of Postgres functions that are not supported and thinking on the complexity of Doctrine, even from my limited knowledge, I have a feeling it is not all that simple. It may fix the most obvious issue and enable Doctrine to successfully execute basic SQL operations like INSERTs, but there may be other less basic functionality in Doctrine that will also fail. That said, I will review the requirement for contributing to the Doctrine project and will try to make the time to contribute a PR for this. I may have a project using Doctrine as an ORM that would benefit from Redshift support. Thanks, Gareth
Author
Owner

@Gabb1995 commented on GitHub (Jun 21, 2018):

Any updates on this? @garethlawson without Doctrine how did you manage to use Redshift if I may ask?

@Gabb1995 commented on GitHub (Jun 21, 2018): Any updates on this? @garethlawson without Doctrine how did you manage to use Redshift if I may ask?
Author
Owner

@Ocramius commented on GitHub (Jun 21, 2018):

Closing: this should be PR-ed directly to https://github.com/doctrine/dbal in form of a new platform once the specifics of the implementation are clear.

Nobody in @doctrine/doctrinecore uses nor has access to a Redshift instance that we can keep public for testing purposes, and we really need the running instance (and test automation checking against it) in order to get anything integrated.

@Ocramius commented on GitHub (Jun 21, 2018): Closing: this should be PR-ed directly to https://github.com/doctrine/dbal in form of a new platform once the specifics of the implementation are clear. Nobody in @doctrine/doctrinecore uses nor has access to a Redshift instance that we can keep public for testing purposes, and we really need the running instance (and test automation checking against it) in order to get anything integrated.
Author
Owner

@garethlawson commented on GitHub (Jun 22, 2018):

@Gabb1995 - I never ended up using Redshift so can't be much help to you I'm afraid. Good luck!

@garethlawson commented on GitHub (Jun 22, 2018): @Gabb1995 - I never ended up using Redshift so can't be much help to you I'm afraid. Good luck!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#3071