Re:Postgres 15 improves UNIQUE and NULL
by SnowHill9902 on Monday July 11, 2022 @10:02AM
(#32056271)
Sure, but it’s arbitrary from a data structure standpoint and sloppy design.
[ Parent
| on HN ]
Re:Postgres 15 improves UNIQUE and NULL
by ryanbrunner on Monday July 11, 2022 @11:16AM
(#32057266)
SQL gives you no other options though, there's no other construct that means "not present", since NULL is unknown vs. not present.
Re:Postgres 15 improves UNIQUE and NULL
by SnowHill9902 on Monday July 11, 2022 @11:38AM
(#32057555)
It depends on your column. If you have a products table and a certain handmade product has no upc, it’s correct to use ‘’ as its value rather than NULL because you know for a fact that its non-existent. Some people respect NULL too much.