Antw: Re: Why does the JDBC driver not support prepareCall?

From: "Marcel Gsteiger" <Marcel(dot)Gsteiger(at)milprog(dot)ch>
To: <joel(at)basefive(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Antw: Re: Why does the JDBC driver not support prepareCall?
Date: 2001-01-20 17:49:47
Message-ID: sa69de34.037@milprog1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

thanks for the response, with UltraDEV 4.0 the problem seems to be solved.

>>> Joel Bernstein <joel(at)basefive(dot)com> 19.01.2001 16.49 Uhr >>>

I have not tried prepareCall with postgreSQL but it makes sense
that it would not be implemented.

prepareCall is a JDBC method used to call stored procedures in a database.

postgreSQL implements stored procedures as function calls.

So up to now the prepareCall method has not been needed because to call
a function you just would use a Statement or PreparedStatement like this:
-----------------------------------
PreparedStatement pstmt = null;

/*
* deleteUser() is the function call.
*/

String sql = "select deleteUser()";

try
{
pstmt = con.prepareStatment(sql);
pstmt.executeQuery();
}
catch(Exception e)
{

}
finally
{

}

---------------------------------------

I have heard talk of an EXECUTE commad that was added for function
calls but I'm not sure is works like the EXEC for stored procedures
does in MS SQLserver and other databases. If it does then prepareCall
could be used.

Anybody have comments on EXECUTE.

Joel

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Fred Yankowski 2001-01-20 18:09:12 no more regression test errors on NT with latest CVS version
Previous Message rob 2001-01-20 17:39:08 Re: currval was (Re: Re: Re: is PG able to handle a >500 GB Database? )