summaryrefslogtreecommitdiff
path: root/src/include/executor/nodeGatherMerge.h
diff options
context:
space:
mode:
authorÁlvaro Herrera <alvherre@kurilemu.de>2025-08-04 13:26:44 +0200
committerÁlvaro Herrera <alvherre@kurilemu.de>2025-08-04 13:26:44 +0200
commitd0654e53f1fc66dd7cd2f66d479f6c643d5427b4 (patch)
tree55fb4726583d04d64140a2c28ecec39a8f9e68c2 /src/include/executor/nodeGatherMerge.h
parentf5a49328f89bcb38e2b03610289d5eaaede94893 (diff)
doc: mention unusability of dropped CHECK to verify NOT NULL
It's possible to use a CHECK (col IS NOT NULL) constraint to skip scanning a table for nulls when adding a NOT NULL constraint on the same column. However, if the CHECK constraint is dropped on the same command that the NOT NULL is added, this fails, i.e., makes the NOT NULL addition slow. The best we can do about it at this stage is to document this so that users aren't taken by surprise. (In Postgres 18 you can directly add the NOT NULL constraint as NOT VALID instead, so there's no longer much use for the CHECK constraint, therefore no point in building mechanism to support the case better.) Reported-by: Andrew <psy2000usa@yahoo.com> Reviewed-by: David G. Johnston <david.g.johnston@gmail.com> Discussion: https://postgr.es/m/175385113607.786.16774570234342968908@wrigleys.postgresql.org
Diffstat (limited to 'src/include/executor/nodeGatherMerge.h')
0 files changed, 0 insertions, 0 deletions