Function calls via JDBC

Поиск
Список
Период
Сортировка
Искать

Function calls via JDBC

От:
Oleg Lebedev <olebedev@waterford.org>
Дата:
Hi,
I created a PL/pgSQL function, but can not call it from my Java program.

I tried using CallableStatement, but it gave me an exception:
Callable Statements are not supported at this time.
So, how should I execute a stored procedure via JDBC?
Thanks,

Oleg

Re: Function calls via JDBC

От:
Barry Lind <barry@xythos.com>
Дата:
functions in PostgreSQL are called via a select statement.

Issue "select your_custom_function()" in a Statement or 
PreparedStatement.  Then get the result like any other select statement 
via the ResultSet.

thanks,
--Barry

Oleg Lebedev wrote:

> Hi,
> I created a PL/pgSQL function, but can not call it from my Java program.
> 
> I tried using CallableStatement, but it gave me an exception:
> Callable Statements are not supported at this time.
> So, how should I execute a stored procedure via JDBC?
> Thanks,
> 
> Oleg
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> 
> 


Re: Function calls via JDBC

От:
"Dave Cramer" <Dave@micro-automation.net>
Дата:
Just do a select with the function in the select
Ie 


Dave

-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org
[mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Oleg Lebedev
Sent: October 12, 2001 6:29 PM
To: Postgres SQL Mailing List
Subject: [JDBC] Function calls via JDBC


Hi,
I created a PL/pgSQL function, but can not call it from my Java program.

I tried using CallableStatement, but it gave me an exception: Callable
Statements are not supported at this time. So, how should I execute a
stored procedure via JDBC? Thanks,

Oleg


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org


FAQ