News for hackers. Stuff that matters.
Re:Postgres 15 improves UNIQUE and NULL by hans_castorp on Monday July 11, 2022 @08:46AM (#32055441)
> Coming from an MS SQL Server background, this behavior surprised me.

Oracle behaves the same as Postgres with regards to NULL values in unique indexes.

> I guess this does go against the spec?

The first comment (by the blog author) https://news.ycombinator.com/item?id=32054151 explained this:

> The background here is that the SQL standard was ambiguous about which of the two ways an implementation should behave. So in the upcoming SQL:202x, this was addressed by making the behavior implementation-defined and adding this NULLS [NOT] DISTINCT option to pick the other behavior.

There are no comments on this comment yet.