JDBC improvements and convenience method suggestions

Vladimir Sitnikov sitnikov.vladimir at gmail.com
Thu Jul 12 22:05:32 UTC 2018

>That would imply that this driver (I assume PostgreSQL?) doesn't
actually prepare a call/statement on prepare.

It does not. PostgreSQL can prepare SQL with "unspecified" types, however
the driver typically waits for all the parameters to be set, then it can
issue a proper prepare/bind/execute commands to the DB (in a single shot).

In a unfortunate case when one issues getParameterMetaData before
parameters are set, the driver parses the SQL with "unspecified" types (db
can handle that somehow).
Of course it loses ability to tell that there are multiple overloads.
If some of the parameters are set, then the driver uses those and it might
infer the rest with a help of the database.


More information about the jdbc-spec-discuss mailing list