Thread: syntax error at or near "PERFORM"

syntax error at or near "PERFORM"

From
Dale
Date:
Hi,

When ever I try and call the PERFORM statement I get:
ERROR:  syntax error at or near "PERFORM"
even when I try executing something basic:  PERFORM (2 + 3);

Any ideas please?

Dale.

Re: syntax error at or near "PERFORM"

From
Dale
Date:
On Aug 15, 2:14 pm, Dale <harris...@yahoo.com.au> wrote:
> Hi,
>
> When ever I try and call the PERFORM statement I get:
> ERROR:  syntax error at or near "PERFORM"
> even when I try executing something basic:  PERFORM (2 + 3);
>
> Any ideas please?
>
> Dale.

I found my problem.  Unfortunately PERFORM can only be used within a
"LANGUAGE plpgsql" script.

Re: syntax error at or near "PERFORM"

From
Raymond O'Donnell
Date:
On 15/08/2008 05:32, Dale wrote:
> On Aug 15, 2:14 pm, Dale <harris...@yahoo.com.au> wrote:
<snip>
>> even when I try executing something basic:  PERFORM (2 + 3);
<snip>
> I found my problem.  Unfortunately PERFORM can only be used within a
> "LANGUAGE plpgsql" script.

Yes, that's it - outside a function, you just do:

   select (2 + 3);

Ray.


------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------