Re: JDBC, prepared queries, and partitioning - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: JDBC, prepared queries, and partitioning
Date
Msg-id 47B37BDA.8020702@opencloud.com
Whole thread Raw
In response to Re: JDBC, prepared queries, and partitioning  (Simon Riggs <simon@2ndquadrant.com>)
Responses Re: JDBC, prepared queries, and partitioning  (Oliver Jowett <oliver@opencloud.com>)
Re: JDBC, prepared queries, and partitioning  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-jdbc
Simon Riggs wrote:

> What we need is a "send parameters inline" mode that can be set as an
> option for a PreparedStatement. Nobody wants to use V2, we just want the
> ability to re-plan a query every time. Perhaps that is best implemented
> as a server side option that can be exposed via JDBC option, since this
> is an SQL requirement and nothing to do with Java.

Unfortunately you can't have your cake and eat it too. Many of the
features specific to V3 *require* that parameters be sent out of line
(e.g. parameter metadata, bytea streaming, possibly OUT parameters)

As Kris said earlier in this thread what we really need is a way to tell
the server "I will only ever use this statement once, with these
particular parameter values, go ahead and optimize the plan on that basis"

-O

pgsql-jdbc by date:

Previous
From: Simon Riggs
Date:
Subject: Re: JDBC, prepared queries, and partitioning
Next
From: Oliver Jowett
Date:
Subject: Re: JDBC, prepared queries, and partitioning