Mark Dilger schrob:
> Tom Lane wrote:
>> No it isn't. The plpgsql scanner treats := and = as *the same token*.
>> They can be interchanged freely. This has nothing to do with the case
>> of modifying a loop variable in particular.
>
> I disagree. If the scanner treated them the same, then
>
> if i := 1 then ...
>
> would work, but it doesn't. The := is rejected in a conditional. Try the
> following code if you don't believe me:
You're confusing the PL/pgSQL scanner with the SQL
scanner. Expressions in PL/pgSQL are handed down to the SQL parser.
regards,
andreas