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 1u15Cm-00Dlkp-GJ for pgsql-bugs@arkaria.postgresql.org; Sat, 05 Apr 2025 15:13: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 1u15Ck-00EQ6D-J6 for pgsql-bugs@arkaria.postgresql.org; Sat, 05 Apr 2025 15:13:06 +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 1u15Ck-00EQ65-AH for pgsql-bugs@lists.postgresql.org; Sat, 05 Apr 2025 15:13:06 +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.96) (envelope-from ) id 1u15Cg-003YvM-0R for pgsql-bugs@lists.postgresql.org; Sat, 05 Apr 2025 15:13:03 +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 535FCxME2461846; Sat, 5 Apr 2025 11:12:59 -0400 From: Tom Lane To: Alvaro Herrera cc: luy70@psu.edu, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18877: PostgreSQL triggers assertion failure In-reply-to: <202504051500.v6ekizm5fcv4@alvherre.pgsql> References: <202504051500.v6ekizm5fcv4@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Sat, 05 Apr 2025 17:00:44 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2461844.1743865979.1@sss.pgh.pa.us> Date: Sat, 05 Apr 2025 11:12:59 -0400 Message-ID: <2461845.1743865979@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera writes: > On 2025-Apr-05, Tom Lane wrote: >> So what we should be doing is building a parse-analysis result >> that deparses into something that looks like the input; probably, >> a JsonArrayQueryConstructor node with an analyzed EXPR_SUBLINK >> SubLink below it. Then we can make this tlist-length check against >> the analyzed SubLink, removing the problem of premature errors that >> are not spelled the way we want. > Sounds reasonable, I can try to find better coding for this, but it > won't be soon. I won't be sad if somebody else wants to do it, so if > you feel like it, please be my guest. Yeah, it's not high priority for me either. Maybe someone else will be interested in the project. >> Anyway, that idea is far too invasive to be back-patchable, >> and IMO it's too late to consider even getting it into v18. >> So what I'm thinking is we should just apply the copyObject >> hack for now, and resolve to reconsider this code later. > Sounds reasonable. OK, I'll get that done. regards, tom lane