Re: syntax error during function call

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: "Aycock, Jeff R(dot)" <JEFF(dot)R(dot)AYCOCK(at)saic(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: syntax error during function call
Date: 2010-01-27 15:59:33
Message-ID: 4B6062E5.6090209@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 27/01/2010 15:40, Aycock, Jeff R. wrote:

> BEGIN
>
> FOR r IN SELECT * FROM schema_1.snapshot_table
>
> LOOP
>
>
>
> DECLARE whoami text := r;

I could be wrong, but I don't think that the DECLARE inside the loop is
correct. I think you have to declare "whoami" with the rest of your
variables in the DECLARE block at the top of the function, and then you
can assign to it inside the loop.

Ray.

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-01-27 16:00:21 Re: Variadic polymorpic functions
Previous Message Pavel Stehule 2010-01-27 15:52:10 Re: Variadic polymorpic functions