Re: prepared statement call fails

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Thomas Hallgren <thhal(at)mailblocks(dot)com>
Cc: Larry White <ljw1001(at)gmail(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: prepared statement call fails
Date: 2004-12-05 21:35:45
Message-ID: 41B37F31.1070205@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Thomas Hallgren wrote:

> The JDBC driver must do some trick then, and make an attempt to convert
> what you wrote into what I suggested. With some risk of getting flogged,
> I must admin that I disagree with that implementation since the
> interface doc's for JDBC mandates that the CallableStatement is for
> Stored Procedures only.

Please explain the difference between a PostgreSQL value-returning
function and a stored procedure that returns a value and takes no OUT
parameters.

The {? = call ...} syntax is standard. I don't see any reason not to map
it to PostgreSQL functions for the cases that make sense.

> Patching it so that it can call functions will cause future problems once the backend really do implement stored procedures correctly.

If the server makes changes that are not backwards-compatible, of course
old drivers are going to break. But a) those sort of changes are rare
and b) the same argument holds true for *everything* in the driver.

I believe the current work on SPs is via a new SQL command (PERFORM?),
so I really can't see how this would cause future problems.

-O

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2004-12-05 21:38:36 Re: prepared statement call fails
Previous Message Oliver Jowett 2004-12-05 21:29:24 Re: prepared statement call fails