| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Alexander Lakhin <exclusion(at)gmail(dot)com> |
| Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: TupleDescAttr bounds checks |
| Date: | 2026-04-04 15:38:24 |
| Message-ID: | 4035884.1775317104@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
I wrote:
> But I bet this loop should throw an error for system columns, too,
> since we surely won't have computed those either.
After poking at that: testing tableoid does sort of work, in that it
reads as the OID of the target table named in COPY. But I think any
rational use for a test on tableoid here would be in connection with
a partitioned target table, and the user would wish it to read as the
OID of the destination partition. So I think we should disallow
tableoid along with the other system columns, pending somebody having
the ambition to make that work.
So I propose the attached for HEAD. (I couldn't resist the temptation
to clean up adjacent comments.) In the back branches it might be
better to just ignore system columns here, on the tiny chance that
somebody thinks they do something useful.
regards, tom lane
| Attachment | Content-Type | Size |
|---|---|---|
| v1-reject-system-columns-in-COPY-WHERE.patch | text/x-diff | 4.6 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Daniel Gustafsson | 2026-04-04 15:49:27 | Re: PG 19 release notes and authors |
| Previous Message | Sami Imseih | 2026-04-04 15:32:07 | Re: Add pg_stat_autovacuum_priority |