Re: Fix missing FORMAT when deparsing JSON_ARRAY(query)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Cc: John Naylor <johncnaylorls(at)gmail(dot)com>, Richard Guo <guofenglinux(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix missing FORMAT when deparsing JSON_ARRAY(query)
Date: 2026-07-23 14:59:38
Message-ID: 1463433.1784818778@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> writes:
>> On Jul 23, 2026, at 21:34, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> I didn't check the code, but it looks like someone thought it'd be a
>> good idea to record the FOR PORTION OF target column by name rather
>> than column number. That'll be an initdb-forcing catalog change, so
>> good thing we found it now.

> If nobody works on this problem tonight, I can try to debug it tomorrow.

Actually, since I'm sitting here at the AI workshop, I thought I'd
try using Claude Code to generate a patch. Here's what it came up
with, after only light steering by me (I told it to factor the patch
this way, rather than making independent v19 and v20 patches).
I would have used a much shorter test case, and some of the comments
seem overly verbose too, but otherwise not bad.

It was Claude's idea to have 2 patches at all: it thought we should
avoid a post-beta2 catversion bump in v19. I might agree with it
except I see catversion was bumped just a few days ago in v19,
so there's no benefit in not doing so again.

regards, tom lane

Attachment Content-Type Size
0001-Deparse-FOR-PORTION-OF-using-the-range-column-s-curr.patch text/x-diff 10.6 KB
0002-Remove-the-vestigial-range_name-field-of-ForPortionO.patch text/x-diff 4.8 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Melanie Plageman 2026-07-23 15:07:56 Re: BUG: ReadStream look-ahead exhausts local buffers when effective_io_concurrency>=64
Previous Message Ilia Evdokimov 2026-07-23 14:44:06 Re: Remove redundant DISTINCT when GROUP BY already guarantees uniqueness