Live data from Hacker News

Just use Postgres

mccue.dev

51–60 of 238 posts

Re: Just use Postgres

#51
post #36
post #20

Earlier quoted context omitted.

more like PHP, which is funny because they always come in pair, prolly originate from the days of LAMP stack. js is more associated with Mongo, another bad db. Most modern js projects (or any modern project really, except PHP) use Postgres

It’s because PHP’s popularity is old and Postgres used to be mid. MySQL was faster and better than Postgres. But Postgres slowly improved and then got better than MySQL while MySQL stagnated. The most basic bugs persisted, basic features never got added and consistency never seemed to be a point of improvement.

Sorry but MySQL was not really “better” than Postgres.

I never understood back then why MySQL was the default choice for so many people.

Re: Just use Postgres

#52

Totally agree - I have tried many databases of all flavors, but I always come back to Postgres. HOWEVER - this blog post is missing a critical point.... the quote should be: ---> Just use Postgres AND ---> Just use SQL "Program the machine" stop using abstractions, ORMs, libraries and layers. Learn how to write SQL - or at least learn how to debug the very good SQL that ChatGPT writes. Please, use all the very powerf…

> People replying saying "only use generic SQL so you cans switch databases!" - to that I say - rubbish!

No, not rubbish

Portability matters. Lockin sucks

Re: Just use Postgres

#53
post #51
post #36

Earlier quoted context omitted.

It’s because PHP’s popularity is old and Postgres used to be mid. MySQL was faster and better than Postgres. But Postgres slowly improved and then got better than MySQL while MySQL stagnated. The most basic bugs persisted, basic features never got added and consistency never seemed to be a point of improvement.

Sorry but MySQL was not really “better” than Postgres. I never understood back then why MySQL was the default choice for so many people.

Many claim that MySQL with default configs had various advantages over postgres with default config and that it had a far better replication story

Re: Just use Postgres

#54

Totally agree - I have tried many databases of all flavors, but I always come back to Postgres. HOWEVER - this blog post is missing a critical point.... the quote should be: ---> Just use Postgres AND ---> Just use SQL "Program the machine" stop using abstractions, ORMs, libraries and layers. Learn how to write SQL - or at least learn how to debug the very good SQL that ChatGPT writes. Please, use all the very powerf…

Stored procedures suck. First of all SQL is a dubious language to write business logic in because it doesn’t have static typing and other goodies we expect nowadays. But more importantly stored procedures tend to drift out of version control. So please don’t.

Re: Just use Postgres

#55
post #40

> If you see a college student or fresh grad using MongoDB stop them. They need help. They have been led astray. I like this sentence way more than I should.

> They have been led astray. They haven't though. What's wrong with using a tool even if it might be bad? Especially as a fresh user. It's how we learn. From both good and bad experiences. > They need help. Sadly it's not the fresh grad, but the "experienced" that only keep their old experiences that need help. Is this comment from 2010? MongoDB has improved. Maybe not to the point of being the best but definitely no…

> Especially as a fresh user. It's how we learn. From both good and bad experiences.

I'd do that, but a superior strategy is letting other people make mistakes and then learning from them. It is best to always be making choices that seem like they could be optimal, with very rare exceptions.

Re: Just use Postgres

#56

> If you see a college student or fresh grad using MongoDB stop them. They need help. They have been led astray. I like this sentence way more than I should.

This sentence has no substance. It gives the reader nothing to understand why MongoDB has both happy customers some who have been disappointed.

Re: Just use Postgres

#57

> If you see a college student or fresh grad using MongoDB stop them. They need help. They have been led astray. I like this sentence way more than I should.

Exactly, SSPL is such a trojan horse, and God knows how they will change the license in the future

Re: Just use Postgres

#58

Ah yes, the I don't have any other use case therefor all others are not good

Yes, one very common use case where Postgres does not scale well is analytics. Snowflake, Vertica, and ClickHouse work much better. I say this after working on several projects where development teams hit a wall with row storage databases. Still, PostgreSQL is great, it's my default DB as well.

Re: Just use Postgres

#59
post #26

Earlier quoted context omitted.

Try to avoid the bespoke features of psql in favor of generic SQL unless cornered by circumstances into doing so, methinks. If there's one complaint I have about pg, it's that it has too many features that encourage finding cute, non standard, non obvious ways of going about things.

> Try to avoid the bespoke features of psql in favor of generic SQL unless cornered by circumstances into doing so, methinks. Why? To make migration to another database easier? I've never had the need to migrate any application away from postgres. I usually take full advantage of what the database can do.

I’m a proponent of vendor lock in is not a big deal - you’re not going to switch from AWS to Azure on a whim and if you do, the fact that you’re using ecs instead of k8s isn’t going to slow you down.

But data ownership is the one place I get iffy. What if your db does a rug pull and changes licenses? There’s certainly precedent in this space for that.

Re: Just use Postgres

#60
post #46
post #35

Earlier quoted context omitted.

> Rick Houlihan is currently at MongoDB. Not according to the YT video. AWS in 2018 I did not detect technical flaws in the article. I thought it was very good

[flagged]

> The author asked where Rick is today and got his name wrong.

That is not what is called a “technical flaw“.

Post reply on HN