agora inbox for pgsql-bugs@postgresql.org  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: leis@in.tum.de
Subject: BUG #19579: Wrong results regression
Date: Sat, 25 Jul 2026 07:19:01 +0000
Message-ID: <19579-e6296b6c9fc0591c@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      19579
Logged by:          Viktor Leis
Email address:      leis@in.tum.de
PostgreSQL version: 19beta2
Operating system:   Ubuntu 26.04 LTS
Description:        

Hi,

The following self-contained query returns rows on current master and on
19beta2, but should return nothing.  PostgreSQL 18 and earlier are
unaffected.

  select * from
    (select 0 as c0 from
       (select t1.c0 from
          (select null::int as c0 from ((select 1) union all (select 2)) t0)
t1
        full join (select 1 as c1 where false) t2 on true) t3
     where c0 <> 7) t4
    cross join (select * from (values (0::bigint)) v(x)
                where now() is not null) t5;

   c0 | x
  ----+---
    0 | 0
    0 | 0
  (2 rows)

t1.c0 is a plain NULL::integer, so "c0 <> 7" is NULL for every row and
nothing should survive it.  EXPLAIN (VERBOSE, COSTS OFF) shows that the
filter is simply gone:

   Result
     Output: 0, '0'::bigint
     ->  Append
           ->  Result
                 One-Time Filter: (now() IS NOT NULL)
           ->  Result
                 One-Time Filter: (now() IS NOT NULL)

Bisection points to commit f2bae51dfd5 ("Keep track of what RTIs a Result
node is scanning", 2025-09-23).

Best regards,
Viktor Leis








view thread (7+ messages)  latest in thread

Message-ID: <19579-e6296b6c9fc0591c@postgresql.org>
Permalink:  ../19579-e6296b6c9fc0591c@postgresql.org/
Also on:    postgresql.org/message-id/19579-e6296b6c9fc0591c@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, leis@in.tum.de
  Subject: Re: BUG #19579: Wrong results regression
  In-Reply-To: <19579-e6296b6c9fc0591c@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