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

From Abhra Kar
Subject Re: Call sql function in psql
Date
Msg-id CAFNULEcaM_GmATjwT=xFgKWvY-3QNgA23+w6v3nOguDXmAy2Kw@mail.gmail.com
Whole thread Raw
In response to Re: Call sql function in psql  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
Thanks 

On Thu, Jan 18, 2018 at 10:01 PM, David G. Johnston <david.g.johnston@gmail.com> wrote:
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: Tom Lane
Date:
Subject: Re: warning for subquery that references a table but not its columns
Next
From: Bjørn T Johansen
Date:
Subject: pgaudit?