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
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
Any updates on this? @garethlawson without Doctrine how did you manage to use Redshift if I may ask?
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.
@Gabb1995 - I never ended up using Redshift so can't be much help to you I'm afraid. Good luck!
Most helpful comment
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 idquery 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