Re: Call sql function in psql

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Abhra Kar <abhra(dot)kar(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Call sql function in psql
Date: 2018-01-18 16:31:17
Message-ID: CAKFQuwYZwavSSfapi-q2njqq8uboES858nc+XNG8Pb5d1FTvRw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jan 18, 2018 at 9:22 AM, Abhra Kar <abhra(dot)kar(at)gmail(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Enrico Pirozzi 2018-01-18 16:34:26 Re: Connection type
Previous Message Rob Sargent 2018-01-18 16:27:21 Re: Call sql function in psql