11 ms·
Does CockroachDB work with Ecto in Elixir? Can it be used as a drop-in replacement for PostgreSQL?
by arjunbajaj 7y ago
Does CockroachDB work with Ecto in Elixir? Can it be used as a drop-in replacement for PostgreSQL?
- latch 7y agoThe Postgrex driver works with cockroach as-is, and they're open to making tweaks as necessary (I made a small patch to Postgrex to support the way cockroachdb encoded empty arrays and it was quickly accepted). I don't think Ecto works as-is, you'd have to check. For simple apps, it might be a drop-in replacement, or require very few tweaks. In addition to the issues mentioned in the OP, the cockroachdb documentation has a detailed list of differences (1). (1) https://www.cockroachlabs.com/docs/stable/detailed-sql-support.html https://www.cockroachlabs.com/docs/stable/detailed-sql-suppo...
- arjunbajaj 7y agoThanks for the quick response.
- andreimatei1 7y agoWould you mind providing a link to the empty arrays patch? Is this something CRDB should fix?
- latch 7y agoIt was fixed in CRDB also: https://github.com/cockroachdb/cockroach/issues/42942 https://github.com/cockroachdb/cockroach/issues/42942
- rafiss 7y agoOur goal is to make switching over from PostgreSQL easy. For Ecto in particular, we have a tracking issue that shows the items in our backlog that would improve compatibility: https://github.com/cockroachdb/cockroach/issues/33441 https://github.com/cockroachdb/cockroach/issues/33441