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 1w98ua-001DLk-1k for pgsql-hackers@arkaria.postgresql.org; Sat, 04 Apr 2026 21:52:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w98uX-000Sp4-2C for pgsql-hackers@arkaria.postgresql.org; Sat, 04 Apr 2026 21:52:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w98uW-000Sou-2V for pgsql-hackers@lists.postgresql.org; Sat, 04 Apr 2026 21:52:09 +0000 Received: from fhigh-a5-smtp.messagingengine.com ([103.168.172.156]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w98uU-00000000aDA-3Dmx for pgsql-hackers@lists.postgresql.org; Sat, 04 Apr 2026 21:52:08 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfhigh.phl.internal (Postfix) with ESMTP id 2CF7A14000CB; Sat, 4 Apr 2026 17:52:05 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Sat, 04 Apr 2026 17:52:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm1; t=1775339525; x=1775425925; bh=OPb889dHTTWNj+1yOgd0fVUdz7crt+pz cCiLI4hBRAo=; b=HmVfGfJC35RGQCzTf00WRsnwTcB4W+e19PES5rTFPIjR8TJC lLUTHf3ZIEK5lT+/SYwNtuOxICGav4KnC5Xblj8FlurZfQRiwSA3oQjivGju6Vt+ a7DhfcZYg9g7PUXfxW0zrvnSbqUOS5iEiYK226EaJo8jxK94ntg/FE/3JQKtBxc9 PK+mYsMwB37aBMIDhKEZUURDN7au8xqFczXDuSOiVADYiFn3meti8Eziv+p8J6rU KuzoJJlOtmLya1VTNy0Lo4NJ4zlcAudiXJomOQOGPFwSOge7QctRRt8QLNykjXJ8 z/kbzG50qVxOKXo8JCuJRJ8FnqrefFQD/WxzJw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1775339525; x= 1775425925; bh=OPb889dHTTWNj+1yOgd0fVUdz7crt+pzcCiLI4hBRAo=; b=O 98fRItAM7ebeAgZh2scypcf0H4jAg49z4md6w5bOv4Zfz1YGQuTWtC2ws2LkLBXz 02NyH/FqtQptjivft61TWROLWt3x7tFF2H6Dw91krdzWcpuNGqWDWerV2HzbnRLR 1fR2j7e2mmnawvCkIY3azDxHVhOa2YG2ayw1+lB1HdW1Sn0i0XKnojzeVHpLmfMC 1pJibVbwFcW4SYk91W42CfuGVlj2oANz3zWvxlbzUVIqJ9wfHmseY2BkmrmXA8dc bex0MzC4vdJywUSppZj5UHojnVgGhifmxA3hhLxAmxDCkOTDj8L6SMQibrZmKJuF C200wHkXlJP+ySR59VC+Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdduvdelkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomheprfgvthgvrhcu gfhishgvnhhtrhgruhhtuceophgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhgqeenuc ggtffrrghtthgvrhhnpeeljedtudfggffffefhieetfeehtedukeejuedtlefhgefgffdu jeehueefudffkeenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhesvghi shgvnhhtrhgruhhtrdhorhhgpdhnsggprhgtphhtthhopeegpdhmohguvgepshhmthhpoh huthdprhgtphhtthhopehtghhlsehsshhsrdhpghhhrdhprgdruhhspdhrtghpthhtohep vgigtghluhhsihhonhesghhmrghilhdrtghomhdprhgtphhtthhopehrohgsvghrthhmhh grrghssehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrshes lhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 4 Apr 2026 17:52:03 -0400 (EDT) Message-ID: <55199b03-dd62-46d3-be0a-e39217b27333@eisentraut.org> Date: Sat, 4 Apr 2026 23:52:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: TupleDescAttr bounds checks To: Tom Lane , Alexander Lakhin Cc: Robert Haas , PostgreSQL Hackers 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> Content-Language: en-US From: Peter Eisentraut In-Reply-To: <4035884.1775317104@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 04.04.26 17:38, Tom Lane wrote: > 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. I think this is the same issue that was discussed here: https://www.postgresql.org/message-id/flat/30c39ee8-bb11-4b8f-9697-45f7e018a8d3%40eisentraut.org There was no conclusion there, but I agree with the proposal to prohibit this use.