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

Поиск
Список
Период
Сортировка
От Andreas Seltenreich
Тема Re: PL/pgSQL 'i = i + 1' Syntax
Дата
Msg-id 87zmhevojb.fsf@gate450.dyndns.org
обсуждение исходный текст
Ответ на Re: PL/pgSQL 'i = i + 1' Syntax  (Mark Dilger <pgsql@markdilger.com>)
Список pgsql-hackers
Mark Dilger schrob:

> Tom Lane wrote:
>> No it isn't.  The plpgsql scanner treats := and = as *the same token*.
>> They can be interchanged freely.  This has nothing to do with the case
>> of modifying a loop variable in particular.
>
> I disagree.  If the scanner treated them the same, then
>
>   if i := 1 then ...
>
> would work, but it doesn't.  The := is rejected in a conditional.  Try the
> following code if you don't believe me:

You're confusing the PL/pgSQL scanner with the SQL
scanner. Expressions in PL/pgSQL are handed down to the SQL parser.

regards,
andreas


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Treat
Дата:
Сообщение: Re: [OT] MySQL is bad, but THIS bad?
Следующее
От: Marc Munro
Дата:
Сообщение: New feature proposal