public inbox for [email protected]  
help / color / mirror / Atom feed
From: solai v <[email protected]>
To: Ayush Tiwari <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Cc: Peter Eisentraut <[email protected]>
Subject: Re: Proposal: INSERT ... BY NAME
Date: Wed, 8 Jul 2026 12:22:28 +0530
Message-ID: <CAF0whufQ0TgqcvkX9wmvHupA0X_UvRNw5aP5OZVYswQ_fiU=-w@mail.gmail.com> (raw)
In-Reply-To: <CAJTYsWVDs7vkEN-eD1NAnZ7XqcfpXu3tP1wMGzJQ12G6eo1oRw@mail.gmail.com>
References: <CAJTYsWVDs7vkEN-eD1NAnZ7XqcfpXu3tP1wMGzJQ12G6eo1oRw@mail.gmail.com>

Hi Ayush,
I tested the patch and the feature worked as expected in my testing.

Before applying the patch, INSERT ... BY NAME resulted in a syntax
error because PostgreSQL only supports positional matching.
After applying the patch, the same query executed successfully and the
source columns were matched to the target columns by their names, even
when the SELECT list was in a different order.

I also tried a case where the SELECT list reordered columns with
different data types (age, id, name). Without BY NAME, PostgreSQL
attempted positional insertion and failed with a type mismatch error.
With BY NAME, the columns were correctly matched by name and the row
was inserted successfully.



view thread (2+ messages)

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], [email protected]
  Subject: Re: Proposal: INSERT ... BY NAME
  In-Reply-To: <CAF0whufQ0TgqcvkX9wmvHupA0X_UvRNw5aP5OZVYswQ_fiU=-w@mail.gmail.com>

* 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