| From: | Marcos Pegoraro <marcos(at)f10(dot)com(dot)br> |
|---|---|
| To: | Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter(at)eisentraut(dot)org> |
| Subject: | Re: Proposal: INSERT ... BY NAME |
| Date: | 2026-07-10 14:44:55 |
| Message-ID: | CAB-JLwZhHvH-y-qxUihfkJ0ojSXLi2bULJ36Y1TFHr_N6-Ehdg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Em sex., 3 de jul. de 2026 às 08:08, Ayush Tiwari <
ayushtiwari(dot)slg01(at)gmail(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2026-07-10 14:49:19 | Re: Missing FSM Update when Updating VM On-access |
| Previous Message | Tom Lane | 2026-07-10 14:41:38 | Re: use of SPI by postgresImportForeignStatistics |