frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

(Ab)Using Null Uniqueness in Postgres

1•BWStearns•1h ago
So I have a pg table of requests where I want a composite key of two columns `(A, B)` where column A should be unique if column B is not null. A is a timestamp, B is just a flag for whether or not it's been canceled. The point of this is to make sure only one uncanceled request can exist for a given time.

I've solved this (clumsily?) by making B a bool and the only values are T and Null. This feels real dirty since F is a possible but irrelevant value, but I'm basically trying to hack in a dependent type check by exploiting the null uniqueness semantics of postgres.

Does anyone have a good suggestion for a cleaner alternative? I kind of wish there were a nullable unit type in PG.

Design equations for 3 precision current sources

https://www.edn.com/basic-design-equations-for-three-precision-current-sources/
1•gsf_emergency_4•32m ago•0 comments

Nobody Has a Personality Anymore

https://www.thefp.com/p/nobody-has-a-personality-anymore-culture-internet-society
1•wslh•32m ago•3 comments

EverMemOS

https://everm.ai
1•pm2222•46m ago•1 comments

No-Trust Protocol for Backtesting Systematic Trading Algorithms

1•PandaMatata•48m ago•0 comments

What's More Dangerous Than India's Frequent Heat Waves? Heat Stress

https://www.nytimes.com/2025/11/16/world/asia/heat-stress-women-india.html
1•fleahunter•48m ago•0 comments

The Censored History of Able Archer 83

https://nsarchive.gwu.edu/briefing-book/able-archer-83/2025-11-14/censored-history-able-archer-83
2•georgecmu•50m ago•1 comments

Dismal reality of modern day corporate IT

4•pyeri•59m ago•1 comments

Ask HN: Where to Migrate as an IT Support/DevOps Engineer for Work?

1•shivajikobardan•1h ago•0 comments

Terminal text editors are a dead end [video]

https://www.youtube.com/watch?v=tvlupFXjqpQ
1•henning•1h ago•0 comments

Why is LSD so potent and why does it last so long?

https://alieninsect.substack.com/p/why-is-lsd-so-potent-and-why-does
2•eatitraw•1h ago•0 comments

Show HN: Smooth window arrangement in macOS restored

https://github.com/ranvel/SmoothMove
1•ranvel•1h ago•0 comments

RealWorldProgrammer – Artificial Intelligence Is Making Us All Dumber

https://realworldprogrammer.com/2025/11/09/artificial-intelligence-is-making-us-all-dumber/
1•rwpdotcom•1h ago•0 comments

IFM Pan World Model

https://ifm.mbzuai.ac.ae/pan/
1•simonpure•1h ago•0 comments

My Time *Ive Coding

https://ikouchiha47.github.io/2025/11/16/ai-code-editors.html
1•argentum47•1h ago•0 comments

Paper: No Cords Attached

https://arxiv.org/abs/2511.09410
1•patann•1h ago•0 comments

The Silicon Leash – Why ASI Needs Human Cooperation

https://dnhkng.github.io/posts/silicon-leash/
1•nnx•1h ago•0 comments

A Complete Guide to USB Connectors

https://uk.rs-online.com/web/content/discovery/ideas-and-advice/usb-connectors-guide
2•teleforce•1h ago•0 comments

(Ab)Using Null Uniqueness in Postgres

1•BWStearns•1h ago•0 comments

Ask HN: How do you monitor the threads on HN you are engaging with?

4•spacemnstr42069•1h ago•2 comments

Ask HN: How are you preparing for retirement?

3•retretret•1h ago•2 comments

OneTrust Talking to Private Equity to Sell

https://captaincompliance.com/education/onetrust-sold-in-private-equity-deal/
1•richartruddie•1h ago•1 comments

One-year-olds among those raped during Sudan civil war

https://www.bbc.com/news/articles/cvgpdxk853jo
2•wslh•1h ago•0 comments

Is our death from a hydrogen sulfide event inevitable in climate warming?

https://www.psu.edu/news/research/story/global-warming-led-climatic-hydrogen-sulfide-and-permian-...
3•DrierCycle•1h ago•0 comments

Funding the Future/ Economic questions: David Graeber on the myth of barter

https://www.taxresearch.org.uk/Blog/2025/11/14/economic-questions-the-david-graeber-question/comm...
1•DrierCycle•2h ago•0 comments

Google Colab Is Coming to VS Code

https://developers.googleblog.com/en/google-colab-is-coming-to-vs-code/
2•tamnd•2h ago•1 comments

The universe's biggest gear reduction GOOGOL to 1 [video]

https://www.youtube.com/watch?v=nFslB0AcVmM
2•CGMthrowaway•2h ago•0 comments

Macrovascular tumor infiltration and tumor cells clusters in cancer patients

https://www.nature.com/articles/s41591-025-03966-3
2•bookofjoe•2h ago•0 comments

Teaching AI to see the world more like we do

https://deepmind.google/blog/teaching-ai-to-see-the-world-more-like-we-do/
2•chumbuket•2h ago•0 comments

Yann LeCun Has Been Right About AI for 40 Years. Now He Thinks Everyone Is Wrong

https://www.wsj.com/tech/ai/yann-lecun-ai-meta-0058b13c
15•Anon84•2h ago•2 comments

Mystery Fuels Unease in Maine Woods: Who Bought Burnt Jacket Mountain?

https://www.nytimes.com/2025/11/15/us/mystery-maine-burnt-jacket-mountain.html
6•mykowebhn•2h ago•1 comments