postgres.git / summary / log / commit / refs

commit    2e123e3c2bd34f2377212a4e7cfcdbf9e2d9c7ff
Author:   Tom Lane <tgl@sss.pgh.pa.us>
Date:     Mon Mar 23 21:25:12 2026 +0000
First released in: 19.0

    Silence compiler warning from older compilers.
    
    Our RHEL7-vintage buildfarm animals are complaining about
    "the comparison will always evaluate as true" for a usage of
    SOFT_ERROR_OCCURRED() on a local variable.  This is the same
    issue addressed in 7bc88c3d6 and some earlier commits, so solve
    it the same way: write "escontext.error_occurred" instead.
    
    Problem dates to recent commit a0b6ef29a, no need for back-patch.


src/backend/commands/tablecmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 219f604df7b..c69c12dc014 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -7628,7 +7628,7 @@ ATExecAddColumn(List **wqueue, AlteredTableInfo *tab, Relation rel, * Phase 3 will re-evaluate with hard errors, so the user gets * an error only if the table has rows. */ - if (SOFT_ERROR_OCCURRED(&escontext)) + if (escontext.error_occurred) { missingIsNull = true; tab->rewrite |= AT_REWRITE_DEFAULT_VAL; [parent: 7c08a7e80972]