Re: PL/pgSQL 'i = i + 1' Syntax - Mailing list pgsql-hackers

From Tom Lane
Subject Re: PL/pgSQL 'i = i + 1' Syntax
Date
Msg-id 21591.1147886743@sss.pgh.pa.us
Whole thread Raw
In response to Re: PL/pgSQL 'i = i + 1' Syntax  (Josh Berkus <josh@agliodbs.com>)
Responses Re: PL/pgSQL 'i = i + 1' Syntax
List pgsql-hackers
Josh Berkus <josh@agliodbs.com> writes:
>> True, but there were clear benefits from doing so.  Disallowing "="
>> assignment in plpgsql wouldn't buy anything, just break programs.

> But it's already disallowed in most places.

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.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: PL/pgSQL 'i = i + 1' Syntax
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] Querying libpq compile time options