Re: prepared statement call fails

Поиск
Список
Период
Сортировка
От Thomas Hallgren
Тема Re: prepared statement call fails
Дата
Msg-id thhal-0qzqPAq+JcC4JMVWy0uhu5aGt4SMIfJ@mailblocks.com
обсуждение исходный текст
Ответ на Re: prepared statement call fails  (Oliver Jowett <oliver@opencloud.com>)
Ответы Re: prepared statement call fails
Список 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 по дате отправления:

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: prepared statement call fails
Следующее
От: "Gaetano Sferra"
Дата:
Сообщение: ResultSet got NullPointerException on getMetaData calls