Re: stored procedure call is not working with "select procedure()"option - Mailing list pgsql-general

From Alban Hertroys
Subject Re: stored procedure call is not working with "select procedure()"option
Date
Msg-id 80339D2F-3A01-4BA8-B3DF-268CE7D35BB1@gmail.com
Whole thread Raw
In response to stored procedure call is not working with "select procedure()" option  (Abhra Kar <abhra.kar@gmail.com>)
Responses Re: stored procedure call is not working with "select procedure()" option  (Abhra Kar <abhra.kar@gmail.com>)
List pgsql-general
> On 20 Feb 2018, at 8:13, Abhra Kar <abhra.kar@gmail.com> wrote:
>
> Hi ,
>          I have a stored procedure name "procedure()". Which I am calling by --
>
> Session sess = (Session)entityManager.getDelegate(); //entityManager is javax.persistent.EntityManager[ Properly
Initialise]
>               sess.createSQLQuery("select procedure()");

…

> It's not throwing any exception but not executing the procedure.Using oracle query -- sess.createSQLQuery("{ call
procedure()}").executeUpdate();   procedure execution is working fine. 

Seems to me you are forgetting to execute the query, like in your Oracle example. IIRC, calling execute() is how to
executea statement that returns a ResultSet in Java. 

Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.



pgsql-general by date:

Previous
From: Abhra Kar
Date:
Subject: Re: stored procedure call is not working with "select procedure()" option
Next
From: yeli
Date:
Subject: Crear Una FUNTION usando ROW_NUMBER