Re: Fix bug of COPY TO support partition table

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>
Subject: Re: Fix bug of COPY TO support partition table
Date: 2026-05-14 16:25:11
Message-ID: CAHGQGwFmKpz1G0bXbHRQ4CfwE4GAbDeQkWfqJTqE6fO=B_4=6A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 14, 2026 at 7:00 PM Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
> As shown above, COPY incorrectly outputs all NULLs.

Good catch!

> The fix is straightforward, just reverse the order of `rel` and `root_rel` when calling `build_attrmap_by_name_if_req()`. After the fix, COPY works correctly:

Thanks for the patch! It looks good to me.

Regards,

--
Fujii Masao

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2026-05-14 16:36:21 Re: Fix bug of COPY TO support partition table
Previous Message Bruce Momjian 2026-05-14 16:05:56 Re: [PATCH] Make spelling consistent in waiteventset.c