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 1rLw8L-001XdE-Kv for pgsql-bugs@arkaria.postgresql.org; Sat, 06 Jan 2024 02:09:58 +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 1rLw8K-006Ftw-Cm for pgsql-bugs@arkaria.postgresql.org; Sat, 06 Jan 2024 02:09:56 +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 1rLw8K-006Fto-4M for pgsql-bugs@lists.postgresql.org; Sat, 06 Jan 2024 02:09:56 +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 1rLw8F-0005KY-Ex for pgsql-bugs@lists.postgresql.org; Sat, 06 Jan 2024 02:09:55 +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 40629n9g1192177; Fri, 5 Jan 2024 21:09:49 -0500 From: Tom Lane To: enricotrinanes@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18272: ERROR XX000 when selecting string_agg with distinct and subquery - occur in pg16.1 and not in pg15.4 In-reply-to: <18272-566ab0edabb9cd13@postgresql.org> References: <18272-566ab0edabb9cd13@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Fri, 05 Jan 2024 21:45:28 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1192175.1704506989.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 05 Jan 2024 21:09:49 -0500 Message-ID: <1192176.1704506989@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > -- SELECT THAT GIVES ERROR. RELATED TO STRING_AGG(DISTINCT (SELECT)) This is apparently a duplicate of bug #18264 ... at least, the patch just committed for that fixes this case for me. https://www.postgresql.org/message-id/flat/18264-e363593d7e9feb7d%40postgr= esql.org regards, tom lane