public inbox for [email protected]  
help / color / mirror / Atom feed
From: Marcos Pegoraro <[email protected]>
To: Ayush Tiwari <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Cc: Peter Eisentraut <[email protected]>
Subject: Re: Proposal: INSERT ... BY NAME
Date: Fri, 10 Jul 2026 11:44:55 -0300
Message-ID: <CAB-JLwZhHvH-y-qxUihfkJ0ojSXLi2bULJ36Y1TFHr_N6-Ehdg@mail.gmail.com> (raw)
In-Reply-To: <CAJTYsWVDs7vkEN-eD1NAnZ7XqcfpXu3tP1wMGzJQ12G6eo1oRw@mail.gmail.com>
References: <CAJTYsWVDs7vkEN-eD1NAnZ7XqcfpXu3tP1wMGzJQ12G6eo1oRw@mail.gmail.com>

Em sex., 3 de jul. de 2026 às 08:08, Ayush Tiwari <
[email protected]> escreveu:

>   - BY NAME requires a query source and is rejected for VALUES and DEFAULT
>     VALUES.  BY POSITION is accepted with DEFAULT VALUES as a no-op.
>
Is it rejected for VALUES, even if those VALUES are named ?
This one should work, doesn't it ?
insert into t1 (c1, c2) by name select * from (Values (1,2)) x(c2, c1)

And is missing a test for select *, right ?
create table a(a int, b int, c int);
create table b(b int, c int, a int);
insert into a by name select * from b;

regards
Marcos


view thread (6+ 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: <CAB-JLwZhHvH-y-qxUihfkJ0ojSXLi2bULJ36Y1TFHr_N6-Ehdg@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