Re: how to execute a stored function that returns a boolean?

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: "J(dot)V(dot)" <jvsrvcs(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: how to execute a stored function that returns a boolean?
Date: 2012-04-27 19:48:40
Message-ID: 4F9AF818.1090805@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 27/04/2012 20:43, J.V. wrote:
> I have created a stored function and wish to execute in pgadmin but keep
> getting an error.
>
> create or replace function myfunc() returns boolean
> as $$
> declare
> begin
> ...
> end;
> $$ language plpgsql;
>
> compiles and works just find, however when I run (in pgadmin III)
>
> select myfunc();
>
> I get errors telling me I need to use 'perform' instead, but when I run:

Can you show us the rest of your function? In pl/pgsql, you use PERFORM
instead of SELECT when you don't need the result of a query; you
probably have a SELECT in there somewhere.

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2012-04-27 19:49:36 Re: how to execute a stored function that returns a boolean?
Previous Message J.V. 2012-04-27 19:43:19 how to execute a stored function that returns a boolean?