News for hackers. Stuff that matters.
Re:Ask HN: How do you test SQL? by jimmygrapes on Tuesday January 31, 2023 @06:48PM (#34604105)
My ignorance of the topic (and experience with a mostly unrelated one) is showing, but all I could think of when you said CTE was "chronic traumatic encephalopathy". This made a lot more sense when you generalized answering the question as if it's a given that Python is necessary (I know that's not your intent, but that's how it comes off).

Not much more to say, just observing, sorry if this is irrelevant commentary.

Re:Ask HN: How do you test SQL? by jph00 on Tuesday January 31, 2023 @06:59PM (#34604196)
CTE==Common Table Expression. It's not specific to any particular language. It's basically like a view, except you can define them the same place as you use them, and they can be recursive.
Re:Ask HN: How do you test SQL? by jimmygrapes on Tuesday January 31, 2023 @07:40PM (#34604605)
Thank you for the clarification, that actually makes sense in context!

... Although also now I'm a little. put off because you reminded me of working with DOS-based SAP interfaces and Oracle's Java-based attempts to make "interactive views" circa 2006 :/

Re:Ask HN: How do you test SQL? by osigurdson on Tuesday January 31, 2023 @08:33PM (#34605119)
>> I could think of when you said CTE was "chronic traumatic encephalopathy"

The title is "Ask HN: How do you test SQL"

Re:Ask HN: How do you test SQL? by db48x on Tuesday January 31, 2023 @11:29PM (#34606367)
Sometimes using databases feels just like repeatedly slamming your head into your desk, so that fits.
Re:Ask HN: How do you test SQL? by collyw on Wednesday February 01, 2023 @03:53AM (#34608092)
I used to think that, but once you start thing about them in the right way, the relational model is pretty nice.
Re:Ask HN: How do you test SQL? by db48x on Wednesday February 01, 2023 @04:01AM (#34608146)
Agreed, but it doesn’t solve every problem. And then there are the purely operational issues; for example a few days ago autovacuum was never able to completely finish vacuuming one particular table, but then the problem mysteriously went away and now it’s fine. Wonderful.