pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dave Cramer <davecramer@postgres.rocks>
Cc: ZhangChi <798604270@qq.com>
Cc: Greg Sabino Mullane <htamfids@gmail.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #19350: Short circuit optimization missed when runningsqlscriptes in JDBC
Date: Wed, 17 Dec 2025 10:44:03 -0500
Message-ID: <2629415.1765986243@sss.pgh.pa.us> (raw)
In-Reply-To: <CADK3HH+EK4qM74YVGobr+oWcpe-EFoKGtQDDtt+Yd87nsVeHsQ@mail.gmail.com>
References: <19350-aed90efec73c66cc@postgresql.org>
	<CAKFQuwbbk7_5vFzkKM+b52xVjJ+p8Wz8UwP5sFWeBnKi69D0-A@mail.gmail.com>
	<tencent_6A625E6BCFAF916999E0C64185022D99ED0A@qq.com>
	<CAKAnmmJ=SfR-C3f9Y6Soi=g-QPRqaxzY5pbUa3QMZsStHMJP6A@mail.gmail.com>
	<tencent_D9E4BA699E83ACD964358E23B46C29753705@qq.com>
	<CADK3HH+EK4qM74YVGobr+oWcpe-EFoKGtQDDtt+Yd87nsVeHsQ@mail.gmail.com>

Dave Cramer <davecramer@postgres.rocks> writes:
> On Tue, 16 Dec 2025 at 20:40, ZhangChi <798604270@qq.com> wrote:
>> But my question is that in the CLI, the test case (like foo2) I showed can
>> return the results. But when I run the same test case in JDBC, the test
>> case triggers an error. I wonder why there is an inconsistency.

> Possibly because JDBC does everything using the V3 protocol whereas psql
> does not. psql uses simple query.

The error will occur if we try to build a "custom plan" for the
prepared query.  I suspect a discrepancy in the plan_cache_mode
settings between JDBC and the user's psql setup.

			regards, tom lane





view thread (13+ messages)

Message-ID: <2629415.1765986243@sss.pgh.pa.us>
Permalink:  ../2629415.1765986243@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2629415.1765986243@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, davecramer@postgres.rocks, 798604270@qq.com, htamfids@gmail.com, david.g.johnston@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #19350: Short circuit optimization missed when runningsqlscriptes in JDBC
  In-Reply-To: <2629415.1765986243@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox