Re: Call sql function in psql - Mailing list pgsql-general

From David G. Johnston
Subject Re: Call sql function in psql
Date
Msg-id CAKFQuwYZwavSSfapi-q2njqq8uboES858nc+XNG8Pb5d1FTvRw@mail.gmail.com
Whole thread Raw
In response to Call sql function in psql  (Abhra Kar <abhra.kar@gmail.com>)
Responses Re: Call sql function in psql  (Abhra Kar <abhra.kar@gmail.com>)
List pgsql-general
On Thu, Jan 18, 2018 at 9:22 AM, Abhra Kar <abhra.kar@gmail.com> wrote:


I tried to modify like

 

        sess.createSQLQuery("select reset_all()")


​This part is correct​

 

.executeUpdate();

 

getting error -- org.postgresql.util.PSQLException: A result was returned when none was expected.



​You need execute the above the same way you would execute "SELECT * FROM tbl"; then just ignore the result set that is returned.

David J.

pgsql-general by date:

Previous
From: Rob Sargent
Date:
Subject: Re: Call sql function in psql
Next
From: Enrico Pirozzi
Date:
Subject: Re: Connection type