Hacker News new | ask | show | jobs
by IgorPartola 264 days ago
During the past 15 years I have been using Postgres quite a bit. I have also almost exclusively have been accessing databases using an ORM. Love them or hate them, they do provide value for a lot of common cases and speed up development and debugability, or at least they did for me and I know they remain very popular.

This all meant that as databases like Postgres keep adding cool new features they mostly go unused because an ORM just doesn’t let you pierce that layer of abstraction except dropping to pure SQL which is typically seen as a code smell and an annoyance to everyone involved.

So on the one hand I love that Postgres is getting amazing new features, not to mention all the cool extensions. On the other hand I and I suspect many others are essentially locked out of them and since most ORMa try to serve multiple databases they typically only include the most common denominator features. As I get more experienced I both see why RDBMS is the right choice most times AND see the appeal of an object store instead of a row store.

1 comments

It depends on the ORM, I know SQLAlchemy and Django ORM have some Postgres specific features (e.g. full text search/indexing). Some also let you extend the ORM to add your own features, or at least write raw SQL.
Yeah I mostly use Django ORM and TortoiseORM these days and have used SQLAlchemy in the past. FTS is nice but things like locks, pubsub, stored procedures, triggers, views/materialized views, and many others are not supported out of the box and for some of these I don’t even see where they could be hooked up. And this is before you get into things like replication and multi-server clusters.