Ühel kenal päeval, K, 2006-05-17 kell 10:22, kirjutas Josh Berkus: > Tom, > > > 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. The i = i + 1 seems to be an > exception. > > So what happens to "i" if I do: > > IF i = i + 1 THEN .... > > does "i" increment? If so, isn't that a bug? > > 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 . -- ---------------- Hannu Krosing Database Architect Skype Technologies OÜ Akadeemia tee 21 F, Tallinn, 12618, Estonia Skype me: callto:hkrosing Get Skype for free: http://www.skype.com ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend