Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w9EQg-001HTN-0O for pgsql-hackers@arkaria.postgresql.org; Sun, 05 Apr 2026 03:45:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w9EQc-001RY0-2R for pgsql-hackers@arkaria.postgresql.org; Sun, 05 Apr 2026 03:45:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w9EQc-001RXr-1V for pgsql-hackers@lists.postgresql.org; Sun, 05 Apr 2026 03:45:38 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w9EQY-00000000fUi-0gyd for pgsql-hackers@lists.postgresql.org; Sun, 05 Apr 2026 03:45:38 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 6353jRhO504242; Sat, 4 Apr 2026 23:45:27 -0400 From: Tom Lane To: Peter Eisentraut cc: Alexander Lakhin , Robert Haas , PostgreSQL Hackers Subject: Re: TupleDescAttr bounds checks In-reply-to: <55199b03-dd62-46d3-be0a-e39217b27333@eisentraut.org> References: <1628959.1774023745@sss.pgh.pa.us> <1631625.1774025167@sss.pgh.pa.us> <3429884.1774238081@sss.pgh.pa.us> <6f435023-8ab6-47c2-ba07-035d0c4212f9@gmail.com> <3956199.1775313002@sss.pgh.pa.us> <3956971.1775313533@sss.pgh.pa.us> <4035884.1775317104@sss.pgh.pa.us> <55199b03-dd62-46d3-be0a-e39217b27333@eisentraut.org> Comments: In-reply-to Peter Eisentraut message dated "Sat, 04 Apr 2026 23:52:02 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <504240.1775360727.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 04 Apr 2026 23:45:27 -0400 Message-ID: <504241.1775360727@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Peter Eisentraut writes: > On 04.04.26 17:38, Tom Lane wrote: >> 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. > I think this is the same issue that was discussed here: > https://www.postgresql.org/message-id/flat/30c39ee8-bb11-4b8f-9697-45f7e= 018a8d3%40eisentraut.org > There was no conclusion there, but I agree with the proposal to prohibit= = > this use. Ah, indeed. Jian's patch in that thread seems rough but potentially workable to me, but seemingly the thread tailed off for lack of interest. I don't want to revive it now as part of a bug fix. Disallowing tableoid for now, and then re-allowing it if someone picks up that patch down the road, seems like a good solution. For one thing, since that patch changes the semantics of tableoid in COPY WHERE, I think it'd be a good idea to have a release or two in between where we throw error. That'd be helpful to flush out any field usages that might be affected. regards, tom lane