Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I would welcome this! I’ve been using SQL for over 20 years and I still sometimes have trouble expressing certain queries, which in my head are well understood. I typically get there but I wish the amount of trial and error was shorter, and the process of turning what I have in my head inside out disappeared.


Absolutely as soon as I start doing multiple joins and throwing up all sorts of trailing syntaxes to further refine/filter/group I get lost

But piping is both intuitive and very easy to understand without having to get everything right from the beginning.

I really hope Postgres 16 can implement pipes, might be interesting to be able to use triggers and functions to pipe to and from, actually might simplify that aspect of it too.


+1

I do find common table expressions (eg with clause) lets me express what I want way easier.

Probably because it makes it easy to express a bunch of operators that are then pipelined…


Same here. I often connect to mariadb via console and try my queries there. I confess that I've used gpt to help me with some hairy ones and it worked quite good.


It's difficult for me to tell how sincere your confession was, I am guessing you meant it in jest.

But it is worth stating nonetheless. No one confesses when they search StackOverflow for something they've solved 100 times before, or when they ask Google a question a dozen times a day. Asking ChatGPT for some insight should equally not be considered sinful :)


There are variations between mysql and mariadb, I've used mysql for a long time now, when I switched to mariadb I found those differences. I find writing complex queries on the console first and then committing it to the code a good strategy. I can see the results right away and some error that I might have done.


I guess I'm shameless for generating 98% of my SQLs




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: