Re: [PATCH] COPY TO FORMAT json: respect column list order

From: Baji Shaik <baji(dot)pgdev(at)gmail(dot)com>
To: Sami Imseih <samimseih(at)gmail(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] COPY TO FORMAT json: respect column list order
Date: 2026-06-15 17:08:29
Message-ID: CA+fm-RP4tX6rCq16GzDLGnAY974oLk6JBtSurk0iTNi8FnQedg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jun 13, 2026 at 6:07 PM Sami Imseih <samimseih(at)gmail(dot)com> wrote:

> This comment is not needed.
>
> But I think we should add a comment explaining the condition here.
>

Done, replaced with a short comment above the condition and
dropped the inner block comment.

Should we just add tests for all the output types?
>

Added. v2 has column-reorder tests for text and csv (before the
JSON section) plus subset and reorder tests for JSON in the JSON
section.

Thanks for the review, Sami. And thanks Andrew for the +1.

v2 attached.

Attachment Content-Type Size
v2-0001-COPY-TO-FORMAT-JSON-respect-column-list-order.patch application/octet-stream 4.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2026-06-15 17:20:31 Re: fix prev link in docs
Previous Message Álvaro Herrera 2026-06-15 17:08:22 Re: Fix unqualified catalog references in psql describe queries