Re: BUG #19625: SQL/JSON boolean DEFAULT expression silently replaced with 'false'

From: QQ Mail <781408517(at)qq(dot)com>
To: zengman(at)halodbtech(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19625: SQL/JSON boolean DEFAULT expression silently replaced with 'false'
Date: 2026-10-12 03:33:59
Message-ID: tencent_3D4EE01AE90E43BA89A9B3AAB1B65C099B07@qq.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Man,

Thank you for the updated patch. This review was prepared with AI assistance, including the local build and test execution.

Your 0002-json-bool-default-fix.patch applied without modification to PostgreSQL commit 9e7d152488f197e96f171f0714459c227c3f7693.

An independent 40-case test matrix went from 13 passing before the patch to all 40 passing afterward. Coverage included NULL boolean defaults; JSON_VALUE/JSON_QUERY with ON ERROR and ON EMPTY; domains and constraints; varchar length enforcement; JSON_TABLE; and volatile defaults evaluated only when needed, including repeated prepared-statement execution.

All nine JSON-related regression tests passed. Testing used Linux, GCC 14.2, --enable-cassert, and CFLAGS='-O0 -g0'. This was not a full PostgreSQL regression run or cross-platform validation.

No blocking issue was found within that scope. Could the regression tests also cover NULL::boolean, JSON_QUERY with ON EMPTY, and a nonconstant boolean default? These exercise distinct failures beyond the three added JSON_VALUE constant tests.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message QQ Mail 2026-10-12 03:42:47 Re: BUG #19736: `JSON_OBJECT ... ABSENT ON NULL` accepts invalid keys when the value is NULL
Previous Message David Rowley 2026-10-12 00:16:36 Re: PG18: use-after-free in exec partition pruning after an EPQ recheck in LockRows