further clarification: alter table alter column set not null - table scan is skipped
The Post Office <noreply@postgresql.org>
From: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: psy2000usa@yahoo.com
Date: 2025-07-30T04:52:16Z
Lists: pgsql-docs
The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/17/docguide.html Description: Hello there, I like PostgreSQL a lot so this is my way of giving back. The "table scan is skipped" optimization can use some clarification https://www.postgresql.org/docs/current/sql-altertable.html#SQL-ALTERTABLE-DESC-SET-DROP-NOT-NULL My proposal is "then the table scan is skipped if the alter statement doesn't drop the constraint." The reason behind the proposal is documented here https://dev.to/andrewpsy/the-set-not-null-downtime-trap-in-postgresql-1o71 Thank you for working on such an awesome project. Cheers, Andrew
Commits
-
doc: mention unusability of dropped CHECK to verify NOT NULL
- a9b4b0665d45 17.6 landed
- 7b1053a57749 18.0 landed
- 126665289fa8 19 (unreleased) landed
- d0654e53f1fc 13.22 landed
- 479ebce12d32 16.10 landed
- 2f600115a5a9 15.14 landed
- 2ea8a37f2784 14.19 landed