Re: UNIQUE null treatment option - Mailing list pgsql-hackers

From Maxim Orlov
Subject Re: UNIQUE null treatment option
Date
Msg-id CACG=ezYbFD0mODDkJZNpMPKKBjf9y_KuA8E142imSAnRwvRjnw@mail.gmail.com
Whole thread Raw
In response to Re: UNIQUE null treatment option  (Pavel Borisov <pashkin.elfe@gmail.com>)
List pgsql-hackers
I find this patch useful. It includes changes in documentation and tests. Code itself looks reasonable to me. Since, unique constraint check is done by corresponding btree index, it makes this feature implementation elegant and lightweight.

In my view, it is sufficient that heap relation can have different nulls treatment in unique constraints for different unique columns. For example:
CREATE TABLE t (i INT UNIQUE NULLS DISTINCT, a INT UNIQUE NULLS NOT DISTINCT);

All the tests are running ok on Linux and MacOS X.

Although, patch doesn't apply with default git apply options. Only with the "three way merge" option (-3). Consider rebasing it, please. Then, in my view, it can be "Ready for committer".
--
Best regards,
Maxim Orlov.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: tab completion of enum values is broken
Next
From: Justin Pryzby
Date:
Subject: Re: Avoiding smgrimmedsync() during nbtree index builds