public inbox for [email protected]  
help / color / mirror / Atom feed
From: David Rowley <[email protected]>
To: Dave Cramer <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: incorrect results and different plan with 2 very similar queries
Date: Thu, 28 Mar 2024 10:56:54 +1300
Message-ID: <CAApHDvqp-Cy3sY8dGPL-zyECCVBjrBN+WrCGg-k5cqU1NegGSA@mail.gmail.com> (raw)
In-Reply-To: <CADK3HHJX0XeJQO9gqhLbywcJgXskezPE9p-jaVLUFB5N2wR_KQ@mail.gmail.com>
References: <CADK3HHJX0XeJQO9gqhLbywcJgXskezPE9p-jaVLUFB5N2wR_KQ@mail.gmail.com>

On Thu, 28 Mar 2024 at 10:33, Dave Cramer <[email protected]> wrote:
> There is a report on the pgjdbc github JDBC Driver shows erratic behavior when filtering on CURRENT_DATE · pgjdbc/pgjdbc · Discussion #3184 (github.com)
>
> Here are the plans.
>
> JDBC - Nested Loop (incorrect result)
>
>                     Index Cond: (mutation >= ((CURRENT_DATE - '1971-12-31'::date) - 28))

> JDBC - Hash Right (correct result)
>
>                     Recheck Cond: (mutation >= ((CURRENT_DATE - '1971-12-31'::date) - 29))

I don't see any version details or queries, but going by the
conditions above, the queries don't appear to be the same, so
different results aren't too surprising and not a demonstration that
there's any sort of bug.

David






view thread (2+ messages)

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: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: incorrect results and different plan with 2 very similar queries
  In-Reply-To: <CAApHDvqp-Cy3sY8dGPL-zyECCVBjrBN+WrCGg-k5cqU1NegGSA@mail.gmail.com>

* 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