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