You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like Postgres 15 has a new thing where you can set UNIQUE NULLS NOT DISTINCT so that NULL values aren't treated as always different. Would I want to support something like this?
In general, a unique constraint is violated if there is more than one row in the table where the values of all of the columns included in the constraint are equal. However, two null values are never considered equal in this comparison. That means even in the presence of a unique constraint it is possible to store duplicate rows that contain a null value in at least one of the constrained columns. This behavior conforms to the SQL standard, but we have heard that other SQL databases might not follow this rule. So be careful when developing applications that are intended to be portable.
search:
postgres on conflict field with null value
The text was updated successfully, but these errors were encountered:
Looks like Postgres 15 has a new thing where you can set
UNIQUE NULLS NOT DISTINCT
so that NULL values aren't treated as always different. Would I want to support something like this?Here is how they behave when this isn't used:
search:
The text was updated successfully, but these errors were encountered: