agora inbox for pgsql-bugs@postgresql.org
help / color / mirror / Atom feedFrom: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: hackerzheng666@gmail.com
Subject: BUG #19630: FOR PORTION OF crashes with XX000 when target range is NULL
Date: Wed, 19 Aug 2026 03:51:32 +0000
Message-ID: <19630-9f10ca28426295fa@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 19630
Logged by: Zheng Hacker
Email address: hackerzheng666@gmail.com
PostgreSQL version: 19beta3
Operating system: Linux x86_64
Description:
PostgreSQL version: 20devel (commit bdbf662, 2026-08-19)
OS: Linux x86_64
When a DELETE/UPDATE ... FOR PORTION OF receives a NULL range
target, it hits elog(ERROR) without errcode() in nodeModifyTable.c,
producing SQLSTATE XX000 instead of a proper error.
Reproducer:
CREATE TABLE t (
id int4range NOT NULL,
valid_at daterange NOT NULL,
name text NOT NULL,
CONSTRAINT t_pk PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
);
INSERT INTO t (id, valid_at, name)
VALUES ('[1,2)', '[2018-01-02,2020-01-01)', 'one');
DELETE FROM t FOR PORTION OF valid_at (NULL) WHERE id = '[1,2)';
-- ERROR: XX000: FOR PORTION OF target was null
-- LOCATION: ExecInitModifyTable, nodeModifyTable.c:5647
Expected: a proper SQLSTATE (e.g. 22004 null_value_not_allowed).
Found by automated SQL fuzzing.
Credit: Zheng Wang, Yanjie Zhao, Yiyang Liu
view thread (3+ messages) latest in thread
Message-ID: <19630-9f10ca28426295fa@postgresql.org>
Permalink: ../19630-9f10ca28426295fa@postgresql.org/
Also on: postgresql.org/message-id/19630-9f10ca28426295fa@postgresql.org
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, hackerzheng666@gmail.com
Subject: Re: BUG #19630: FOR PORTION OF crashes with XX000 when target range is NULL
In-Reply-To: <19630-9f10ca28426295fa@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox