Re: Fix jsonpath printing of operations followed by an accessor

From: Ishjaap Singh <ishjaap(dot)singh07(at)gmail(dot)com>
To: João Rito <joaovictor(dot)rito(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Fix jsonpath printing of operations followed by an accessor
Date: 2026-11-21 08:58:40
Message-ID: CA+Y2BmcAijCMjYv=6S9ToyWYpCAyp=mNwLrBAO3LNesppFZ8+g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi João,

Thanks for testing it, and for the round-trip comparison.

On the $ ? (!((-$.a).abs() == 2)) row: it does catch the bug. Without
the fix, the printed form loses the parentheses around -$.a, and after
the reparse that row returns [{"a": -2, "b": -1}] instead of []. But
you're right that an empty expected result doesn't show much to someone
reading the test.

The attached v2 compares with -2 instead, so the correct result is the
document and the unfixed printed form returns []. Nothing else changed.

Regards,
Ishjaap Singh

Attachment Content-Type Size
v2-0001-Fix-jsonpath-printing-of-operations-followed-by-a.patch application/octet-stream 8.9 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ishjaap Singh 2026-11-21 09:37:40 Re: Reject incompatible options specified with VACUUM ONLY_DATABASE_STATS
Previous Message Raja Sai pranav 2026-11-21 06:00:42 Re: pg_waldump: WAL in pg_wal.old/ inside a tar archive is read as WAL