public inbox for [email protected]
help / color / mirror / Atom feedFrom: Masahiko Sawada <[email protected]>
To: [email protected]
Subject: pgsql: Fix attribute mapping for COPY TO on partitioned tables.
Date: Thu, 14 May 2026 17:33:29 +0000
Message-ID: <[email protected]> (raw)
Fix attribute mapping for COPY TO on partitioned tables.
Commit 4bea91f21f61 enabled COPY TO on a partitioned table to read
tuples from its partitions and mapped them to the root table's tuple
descriptor before output. However, it incorrectly built the attribute
map from the root table to the partition.
This commit fixes by building the attribute map from the partition to
the root table, ensuring that partition attributes are correctly
mapped to their corresponding root attributes.
Author: Chao Li <[email protected]>
Reviewed-by: Fujii Masao <[email protected]>
Reviewed-by: Masahiko Sawada <[email protected]>
Discussion: https://postgr.es/m/[email protected]
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/82f0135a2630cc4465a8a424e38faf0f4e92f421
Modified Files
--------------
src/backend/commands/copyto.c | 4 ++--
src/test/regress/expected/copy.out | 11 +++++++++++
src/test/regress/sql/copy.sql | 9 +++++++++
3 files changed, 22 insertions(+), 2 deletions(-)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: pgsql: Fix attribute mapping for COPY TO on partitioned tables.
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox