Re: prepared statement call fails - Mailing list pgsql-jdbc

From Thomas Hallgren
Subject Re: prepared statement call fails
Date
Msg-id thhal-0qzqPAq+JcC4JMVWy0uhu5aGt4SMIfJ@mailblocks.com
Whole thread Raw
In response to Re: prepared statement call fails  (Oliver Jowett <oliver@opencloud.com>)
Responses Re: prepared statement call fails  (Markus Schaber <schabios@logi-track.com>)
List pgsql-jdbc
Oliver Jowett wrote:

> If you have some particular concerns about how the proposed SP syntax,
> whatever it is, is going to break the JDBC driver, by all means raise
> them.. but this seems like vague handwaving at the moment.

I agree that abandoning the current support is a very bad idea. We all
have to live with it now. I was surprised to see that it was implemented
this way though. My guess is that it's uncommon. It's certanly doable
although you will need to dynamically support both mappings once the
real SP's arrive and also thoroughly explain some subtle differences in
how auto-commit works one way if the underlying code calls a function
and another way if it calls a stored procedure.

I for one will stick with PreparedStatement for function calls and
reserve CallableStatement for future SP's when using the client driver.
This is the approach that I also take on my JDBC driver in PL/Java. Any
attempt to use CallableStatement there will yield an exception informing
the user that stored procedures are not yet implemented. I do not do it
that way because I'm lazy. I do it because I think it's cleaner and
closer to the spec.

No I'll take down my hand and be silent :-)

Regards,
Thomas Hallgren



pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: prepared statement call fails
Next
From: "Gaetano Sferra"
Date:
Subject: ResultSet got NullPointerException on getMetaData calls