Re: PL/pgSQL: « arr[j].a := v » works fine in PG Version 14.4, fails to compile in Version 11.2. Which version brought the fix?

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: PL/pgSQL: « arr[j].a := v » works fine in PG Version 14.4, fails to compile in Version 11.2. Which version brought the fix?
Дата
Msg-id CAKFQuwZoiSWH8tJubOvodr9BhvaD24VJJRLyb=BEOZp--zp33w@mail.gmail.com
обсуждение исходный текст
Ответ на PL/pgSQL: « arr[j].a := v » works fine in PG Version 14.4, fails to compile in Version 11.2. Which version brought the fix?  (Bryn Llewellyn <bryn@yugabyte.com>)
Ответы Re: PL/pgSQL: « arr[j].a := v » works fine in PG Version 14.4, fails to compile in Version 11.2. Which version brought the fix?  (Bryn Llewellyn <bryn@yugabyte.com>)
Список pgsql-general
On Mon, Jul 25, 2022 at 10:34 AM Bryn Llewellyn <bryn@yugabyte.com> wrote:
I copied my testcase at the end. It runs OK and produces the output that I expect using PG Version 14.4. But using Version 11.9 (and earlier 11 sub-versions), it fails to compile with this error:

syntax error at or near "."
lhs[j].a := rhs[j].a;
      ^
If I comment out the "Ideal approach" loop, then it runs fine in PG 11 and produces the same output as the "Ideal approach" does in PG 14,

I looked at the Release Notes for each of Versions 14, 13, and 12:


From the change to this page I'd say v14:


The release note for v14 say:

PL/PgSQL: 
Improve PL/pgSQL's expression and assignment parsing (Tom Lane)
This change allows assignment to array slices and nested record fields.

David J.

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

Предыдущее
От: Bryn Llewellyn
Дата:
Сообщение: PL/pgSQL: « arr[j].a := v » works fine in PG Version 14.4, fails to compile in Version 11.2. Which version brought the fix?
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Password reset link / 'less' does not exit in psql version 13.4