From: | Andreas Seltenreich <andreas+pg(at)gate450(dot)dyndns(dot)org> |
---|---|
To: | Mark Dilger <pgsql(at)markdilger(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: PL/pgSQL 'i = i + 1' Syntax |
Date: | 2006-05-19 00:36:24 |
Message-ID: | 87zmhevojb.fsf@gate450.dyndns.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Marc Munro | 2006-05-19 00:39:02 | New feature proposal |
Previous Message | Robert Treat | 2006-05-19 00:35:02 | Re: [OT] MySQL is bad, but THIS bad? |