News for hackers. Stuff that matters.
Re:Postgres 15 improves UNIQUE and NULL by jl6 on Monday July 11, 2022 @08:10AM (#32055054)
> Should databases have two separate values for unknown or no value? That sounds like a world of hurt, with two types of null.

It’s also a non-problem in practice, because if an application needs to distinguish between multiple types of nulls, it can very easily just use an extra column holding the information needed to disambiguate.

Re:Postgres 15 improves UNIQUE and NULL by jstanley on Monday July 11, 2022 @08:23AM (#32055185)
Similarly, the need for non-boolean columns is a non-problem in practice, because an application can just make an extra column for every bit it needs to store. If it needs strings or arbitrary-width numbers it can just join on other tables that store those bits.

(Existence of a workaround doesn't turn a problem into a non-problem)

Re:Postgres 15 improves UNIQUE and NULL by jl6 on Monday July 11, 2022 @08:59AM (#32055581)
I stand by it being a non-problem in practice because the workaround is trivial, and the supposed solution adds complexity everywhere.

There isn’t even a universally agreed methodology for how to handle nulls in the relational model in theory.

It’s a semantic problem that can only be solved with reference to the requirements of a particular use case, and when you do that using explicit extra columns, the problem evaporates.