Re: Proposal: INSERT ... BY NAME - Mailing list pgsql-hackers

From Marcos Pegoraro
Subject Re: Proposal: INSERT ... BY NAME
Date
Msg-id CAB-JLwZhHvH-y-qxUihfkJ0ojSXLi2bULJ36Y1TFHr_N6-Ehdg@mail.gmail.com
Whole thread
In response to Proposal: INSERT ... BY NAME  (Ayush Tiwari <ayushtiwari.slg01@gmail.com>)
List pgsql-hackers
Em sex., 3 de jul. de 2026 às 08:08, Ayush Tiwari <ayushtiwari.slg01@gmail.com> 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

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: use of SPI by postgresImportForeignStatistics
Next
From: Andres Freund
Date:
Subject: Re: Missing FSM Update when Updating VM On-access