Re: Strange behavior of "=" as assignment operator
| От | Tom Lane |
|---|---|
| Тема | Re: Strange behavior of "=" as assignment operator |
| Дата | |
| Msg-id | 20955.1370098424@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Strange behavior of "=" as assignment operator (David Johnston <polobo@yahoo.com>) |
| Ответы |
Re: Strange behavior of "=" as assignment operator
|
| Список | pgsql-general |
David Johnston <polobo@yahoo.com> writes:
> A bogus warning is nearly as bad as simply disallowing the syntax in the
> first place and I do not like turning one on unless there is the decision to
> disallow the syntax in the future.
TBH I do not see this happening. GET DIAGNOSTICS is just the tip of the
iceberg. The SQL standard uses "=" for assignment in other contexts,
most notably UPDATE, but also the SQL/PSM standard uses it in
<assignment statement> which is the exact same thing as in pl/pgsql.
So while purists might wish we only accepted :=, doing so would be
inconsistent with SQL.
I think we should just document it and move on.
regards, tom lane
В списке pgsql-general по дате отправления: