Re: BUG #19454: PL/pgSQL mishandling jsonb attribute reference

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "ma(dot)sao(at)msa(dot)hinet(dot)net" <ma(dot)sao(at)msa(dot)hinet(dot)net>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #19454: PL/pgSQL mishandling jsonb attribute reference
Date: 2026-04-13 14:10:29
Message-ID: CAKFQuwak==1Pt12Bo571YCgKJ5wyV6RakSQeYdazLo4q+JDMkA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sunday, April 12, 2026, PG Bug reporting form <noreply(at)postgresql(dot)org>
wrote:

> The following bug has been logged on the website:
>
> Bug reference: 19454
> Logged by: CN Liou
> Email address: ma(dot)sao(at)msa(dot)hinet(dot)net
> PostgreSQL version: 18.3
> Operating system: Linux Debian Bookworm
> Description:
>
> v_payload := v_payload || tj->'delta'; -- The problematic line
> --v_payload := (SELECT v_payload || (tj->'delta')); --This avoids
> the issue.
>

I’m not following. The problematic line above is indeed annoying but it’s
not a bug. Operator precedence is behaving as documented. The second line
(wrapping tj->’delta’ with parentheses) is simply the necessary way to
write many expressions involving the “->”-like json[b] operators.

David J.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2026-04-13 14:12:31 Re: BUG #19454: PL/pgSQL mishandling jsonb attribute reference
Previous Message PG Bug reporting form 2026-04-13 12:48:35 BUG #19455: ALTER TABLE RENAME will rename a sequence