Hacker News new | ask | show | jobs
by ncake 1553 days ago
This.

"you've got a syntax error at around here: [the entire query]. go consult the manual or something idk"

2 comments

I feel like this is MySQL's model very well. A long time ago they traded some strictness for speed, because the average MySQL user was doing some basic CRUD apps and it never mattered. But adding useful checks and good messages everywhere requires a fair amount of engineer effort and probably costs more processing than whatever performance benchmark they are probably optimizing for.
It shouldn't be tough to tell you "a comma is missing in this line". currently you get another absurd not only vague, but incorrect error codes.
You say that but having worked on a DSL for a while, you end up sprinkling this code all over the place and things which might be simple loops, or string.splits, etc become much more gnarly.
I like Datagrip for writing SQL for this purpose.
I've used to write my queries in pgAdmin or VSCode.

I downloaded DataGrip after reading your comment, and damn, the autocomplete is just so good. It even shows me the arguments of Postgresql extensions like TimescaleDB.

This almost reads like an ad, but I just wanted to thank you for changing my life :P