Re: prepared statement call fails

From: Thomas Hallgren <thhal(at)mailblocks(dot)com>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: prepared statement call fails
Date: 2004-12-06 00:04:48
Message-ID: thhal-0qzqPAq+JcC4JMVWy0uhu5aGt4SMIfJ@mailblocks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Andrew M 2004-12-06 01:48:05 Re: SSL confirmation
Previous Message Doug McNaught 2004-12-05 23:51:16 Re: SSL confirmation