Postgres FM cover image

Postgres FM

NULLs: the good, the bad, the ugly, and the unknown

Aug 5, 2022
The podcast discusses challenges and new features in handling NULL values in databases, including a new feature in Postgres 15. They also share experiences with coding issues in survey data and the importance of handling null values in SQL queries. The chapter highlights resources for learning, emphasizes the importance of testing, and mentions the benefits of Postgres 11 in updating billion row tables.
27:10

Podcast summary created with Snipd AI

Quick takeaways

  • Postgres 15 introduces a new capability allowing unique constraints to not distinguish null values, enabling only one null value for certain columns.
  • Nulls in SQL have diverse effects depending on the context, with some operations ignoring nulls while others consider them, leading to potentially unexpected results.

Deep dives

The importance of learning from mistakes

Mistakes in SQL and specifically with null values (Nals) can be painful and tricky to handle. These mistakes often go unnoticed because they don't generate errors immediately. To address this, Postgres 15 introduces a new capability allowing unique constraints to not distinguish Nals, enabling only one null value for certain columns. However, developers must be cautious when dealing with Nals and ensure proper handling to avoid unexpected behaviors.

Remember Everything You Learn from Podcasts

Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.
App store bannerPlay store banner