frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Good CTE, Bad CTE

https://boringsql.com/posts/good-cte-bad-cte/
28•radimm•1d ago

Comments

vlaaad•1h ago
Use the term, never define the term, classic.

CTE stands for Common Table Expressions in SQL. They are temporary result sets defined within a single query using the WITH clause, acting like named subqueries to improve readability and structure.

radimm•1h ago
OP here, damn - that's a very good point. Can't believe I missed it.
iainmerrick•28m ago
From the headline, I thought it might be about sports-related concussions!

I was morbidly curious what a "good CTE" could possibly be...

qwertydog•1h ago
Great post - thanks. I think the columns in the index you suggested in the pre-pg12 section are in the wrong order (that index would get used)
radimm•53m ago
Thanks - I will recheck later today.
dspillett•1h ago
I wrangle databases by day, and do martial arts of an evening. Two arenas where CTEs can cause significant headaches!
yen223•57m ago
I've always thought of CTEs as a code organisation tool, not an optimisation tool. The fact the some rdbms treats them as an optimisation fence was a bug, not a feature.
solumunus•29m ago
Improved readability is definitely the primary benefit.
bob1029•55m ago
> Recursive CTEs use an iterative working-table mechanism. Despite the name, they aren't truly recursive. PostgreSQL doesn't "call itself" by creating a nested stack of unfinished queries.

If you want something that is more like actual recursion (I.e., depth-first), Oracle has CONNECT BY which does not require the same kind of tracking. It also comes with extra features to help with cycle detection, stack depth reflection, etc.

If your problem is aligned with the DFS model, the oracle technique can run circles around recursive CTEs. Anything with a deep hierarchy and early termination conditions is a compelling candidate.

Axios compromised on NPM – Malicious versions drop remote access trojan

https://www.stepsecurity.io/blog/axios-compromised-on-npm-malicious-versions-drop-remote-access-t...
725•mtud•6h ago•235 comments

Ollama is now powered by MLX on Apple Silicon in preview

https://ollama.com/blog/mlx
229•redundantly•5h ago•103 comments

Artemis II is not safe to fly

https://idlewords.com/2026/03/artemis_ii_is_not_safe_to_fly.htm
302•idlewords•6h ago•192 comments

Universal Claude.md – cut Claude output tokens

https://github.com/drona23/claude-token-efficient
293•killme2008•7h ago•115 comments

Google's 200M-parameter time-series foundation model with 16k context

https://github.com/google-research/timesfm
103•codepawl•3h ago•50 comments

Fedware: Government apps that spy harder than the apps they ban

https://www.sambent.com/the-white-house-app-has-huawei-spyware-and-an-ice-tip-line/
560•speckx•14h ago•184 comments

Do your own writing

https://alexhwoods.com/dont-let-ai-write-for-you/
532•karimf•20h ago•188 comments

We're Pausing Asimov Press

https://www.asimov.press/p/pause
23•bookofjoe•23h ago•3 comments

GitHub backs down, kills Copilot pull-request ads after backlash

https://www.theregister.com/2026/03/30/github_copilot_ads_pull_requests/
183•_____k•3h ago•104 comments

RamAIn (YC W26) Is Hiring

https://www.ycombinator.com/companies/ramain/jobs/jezgwo5-ai-ml-research-engineer
1•svee•2h ago

Clojure: The Documentary, official trailer [video]

https://www.youtube.com/watch?v=JJEyffSdBsk
185•fogus•4d ago•16 comments

Good CTE, Bad CTE

https://boringsql.com/posts/good-cte-bad-cte/
28•radimm•1d ago•9 comments

Android Developer Verification

https://android-developers.googleblog.com/2026/03/android-developer-verification-rolling-out-to-a...
247•ingve•11h ago•250 comments

Turning a MacBook into a touchscreen with $1 of hardware (2018)

https://anishathalye.com/macbook-touchscreen/
317•HughParry•13h ago•148 comments

How to turn anything into a router

https://nbailey.ca/post/router/
672•yabones•19h ago•230 comments

Claude Code's source code has been leaked via a map file in their NPM registry

https://twitter.com/Fried_rice/status/2038894956459290963
10•treexs•6m ago•0 comments

Mr. Chatterbox is a Victorian-era ethically trained model

https://simonwillison.net/2026/Mar/30/mr-chatterbox/
46•y1n0•6h ago•24 comments

Oscar Reutersvärd (2021)

https://escherinhetpaleis.nl/en/about-escher/escher-today/oscar-reutersvard
32•layer8•1d ago•2 comments

Show HN: Free AI Coding Skills for Rails

https://www.railsreviews.com/skills
7•julianrubisch•1h ago•2 comments

Bird brains (2023)

https://www.dhanishsemar.com/writing/bird-brains
317•DiffTheEnder•19h ago•200 comments

OpenGridWorks: The Electricity Infrasctructure, Mapped

https://www.opengridworks.com
107•jonbraun•11h ago•13 comments

One of the largest salt mines in the world exists under Lake Erie

https://apnews.com/article/cleveland-salt-mine-winter-road-0daf091e3d56f65766bcf6a597683893
19•1659447091•2d ago•13 comments

Agents of Chaos

https://agentsofchaos.baulab.info/report.html
107•luu•3d ago•13 comments

CodingFont: A game to help you pick a coding font

https://www.codingfont.com/
412•nvahalik•17h ago•202 comments

Incident March 30th, 2026 – Accidental CDN Caching

https://blog.railway.com/p/incident-report-march-30-2026-accidental-cdn-caching
55•cebert•7h ago•20 comments

Vulnerability research is cooked

https://sockpuppet.org/blog/2026/03/30/vulnerability-research-is-cooked/
178•pedro84•14h ago•122 comments

Cherri – programming language that compiles to an Apple Shortuct

https://github.com/electrikmilk/cherri
304•mihau•3d ago•59 comments

Unit: A self-replicating Forth mesh agent running in a browser tab

https://davidcanhelp.github.io/unit/
34•DavidCanHelp•4d ago•3 comments

Sony halts memory card shipments due to NAND shortage

https://www.techzine.eu/news/devices/140058/sony-halts-memory-card-shipments-due-to-nand-shortage/
49•methuselah_in•3h ago•15 comments

Researchers find 3,500-year-old loom that reveals textile revolution

https://web.ua.es/en/actualidad-universitaria/2026/marzo2026/23-31/ua-researchers-find-3-500-year...
113•geox•3d ago•14 comments