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

From Andrew Dunstan
Subject Re: PL/pgSQL 'i = i + 1' Syntax
Date
Msg-id 446B8809.4000504@dunslane.net
Whole thread Raw
In response to Re: PL/pgSQL 'i = i + 1' Syntax  (Hannu Krosing <hannu@skype.net>)
Responses Re: PL/pgSQL 'i = i + 1' Syntax
Re: PL/pgSQL 'i = i + 1' Syntax
List pgsql-hackers
Hannu Krosing wrote:
>> I don't think too many people are using that functionality intentionally; I 
>> probably write more PL/pgSQL than anyone and would regard any assignment 
>> without ":=" as a bug.
>>     
>
> I do occasionally write some pl/pgSQL, and have at some points written a
> lot of it. And most of it uses = instead of := , including all code
> written during last 1.5 years. 
>
> Once I found out that = works for assignment, i completely stopped
> using := .I have treated := as "deprecated" for some time already.
>
> So allowing only := for assignment would make me very sad .
>   

I can only comment that that seems crazy.

:= is
. documented
. consistent with pl/sql and ancestors

Even C doesn't use the same operator for assignment and comparison.

Sometimes I wonder if large parts of the IT world is trying to pretend 
that the Algol family never existed.

cheers

andrew





pgsql-hackers by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: Compression and on-disk sorting
Next
From: "Jim C. Nasby"
Date:
Subject: Cross-version dumps (was: [DOCS] Mention pg_dump version portability)