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.94.2) (envelope-from ) id 1ruIeS-004KWJ-Ai for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Apr 2024 21:05:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1ruIeR-00B93x-BH for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Apr 2024 21:05:07 +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.94.2) (envelope-from ) id 1ruIeR-00B93p-1k for pgsql-hackers@lists.postgresql.org; Tue, 09 Apr 2024 21:05:07 +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.94.2) (envelope-from ) id 1ruIeO-0005IS-Rc for pgsql-hackers@postgresql.org; Tue, 09 Apr 2024 21:05:06 +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 439L52NV3870978; Tue, 9 Apr 2024 17:05:02 -0400 From: Tom Lane To: Alexander Korotkov cc: Robert Haas , "pgsql-hackers@postgresql.org" Subject: Re: post-freeze damage control In-reply-to: References: <3604469.1712628736@sss.pgh.pa.us> <3867997.1712695051@sss.pgh.pa.us> Comments: In-reply-to Alexander Korotkov message dated "Tue, 09 Apr 2024 23:48:12 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <3870976.1712696702.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Tue, 09 Apr 2024 17:05:02 -0400 Message-ID: <3870977.1712696702@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alexander Korotkov writes: > On Tue, Apr 9, 2024 at 11:37 PM Tom Lane wrote: >> What exactly is the point of having a NodeTag in the struct though? >> If you don't need it to be a valid Node, that seems pointless and >> confusing. We certainly have plenty of other lists that contain >> plain structs without tags, so I don't buy that the List >> infrastructure is making you do that. > This code mixes Expr's and hash entries in the single list. The point > of having a NodeTag in the struct is the ability to distinguish them > later. If you're doing that, it really really ought to be a proper Node. If nothing else, that would aid debugging by allowing the list to be pprint'ed. regards, tom lane