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  (Kevin Grittner <kgrittn@ymail.com>)
Список 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 по дате отправления:

Предыдущее
От: David Johnston
Дата:
Сообщение: Re: Sum raw with the same continuous flags
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Insert with query