# Postgres Calculations and the Ambiguity of NULL

DevFeed: [Postgres Calculations and the Ambiguity of NULL](<https://devfeed.tech/articles/postgres-calculations-and-the-ambiguity-of-null-14483.md>)

Original publisher: [Read original article](<https://www.crunchydata.com/blog/postgres-calculations-and-the-ambiguity-of-null>)

Author: Christopher Winslett

Published: 2026-09-02T17:00:00Z

Content type: article

Language: en

Sources: [CrunchyData Blog](<https://devfeed.tech/sources/crunchydata-blog.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>)

Tags: [fun-with-sql](<https://devfeed.tech/tags/fun-with-sql.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [schema](<https://devfeed.tech/tags/schema.md>), [sql](<https://devfeed.tech/tags/sql.md>)

## AI overview

This article explains how Postgres handles NULL as an unknown marker in arithmetic, comparisons, concatenation, aggregates, window functions, predicates, joins, and sorting. It covers SQL three-valued logic, common surprises such as NOT IN and dropped rows, ways to test or handle missing values, and Postgres 19 IGNORE NULLS.

## Source excerpt

How Postgres evaluates calculations when a value is unknown: three-valued logic, arithmetic and concatenation with NULL, NOT IN, aggregates and window functions, NULL sort order, and Postgres 19 IGNORE NULLS.