From: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
---|---|
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:49:36 |
Message-ID: | CAHyXU0yEbhduUMiXbQiH8DBx4xbwZudmvHDVni6kHfecSJfS9Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Apr 27, 2012 at 2:43 PM, J.V. <jvsrvcs(at)gmail(dot)com> 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:
that error is being thrown from indie the function. somewhere inside
the function body you are using select where you should be using
perform.
> perform myfunc(); it says : syntax error at or near "perform"
> LINE 1: perform myfunc();
perform only makes sense inside functions. it has not meaning except inside sql.
merlin
From | Date | Subject | |
---|---|---|---|
Next Message | Raymond O'Donnell | 2012-04-27 19:53:44 | Re: How to add "on delete cascade" constraints |
Previous Message | Raymond O'Donnell | 2012-04-27 19:48:40 | Re: how to execute a stored function that returns a boolean? |