Re: PL/pgSQL 'i = i + 1' Syntax

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Hannu Krosing <hannu(at)skype(dot)net>
Cc: josh(at)agliodbs(dot)com, pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, all(at)adv(dot)magwien(dot)gv(dot)at
Subject: Re: PL/pgSQL 'i = i + 1' Syntax
Date: 2006-05-17 20:31:05
Message-ID: 446B8809.4000504@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim C. Nasby 2006-05-17 20:58:45 Cross-version dumps (was: [DOCS] Mention pg_dump version portability)
Previous Message Jim C. Nasby 2006-05-17 20:20:07 Re: Compression and on-disk sorting