postgres-github.git / summary / log / commit / refs

commit    d8b5d87e545c340b129150d7214bff15275e2634
Author:   Fujii Masao <fujii@postgresql.org>
Date:     Fri May 22 14:59:04 2026 +0000

    Prevent setting NO INHERIT on partitioned NOT NULL constraints
    
    The documentation states that NOT NULL constraints on partitioned tables
    are always inherited by all partitions, and therefore cannot be declared
    NO INHERIT. While a check already existed to reject creating such
    constraints with NO INHERIT, previously the same check was missing for
    ALTER TABLE ... ALTER CONSTRAINT ... NO INHERIT.
    
    This commit adds the missing check so that attempting to set NO INHERIT
    on a partitioned NOT NULL constraint now fails.
    
    Backpatch to v18, where ALTER TABLE ... ALTER CONSTRAINT ... [NO] INHERIT
    was added.
    
    Author: Andreas Karlsson <andreas@proxel.se>
    Reviewed-by: Jim Jones <jim.jones@uni-muenster.de>
    Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
    Discussion: https://postgr.es/m/ecc985ad-6ec1-4094-a315-317943ca5f3f@proxel.se
    Backpatch-through: 18