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 1uFdtP-006z3W-3C for pgsql-bugs@arkaria.postgresql.org; Thu, 15 May 2025 19:05:19 +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 1uFdtO-00GEC0-6v for pgsql-bugs@arkaria.postgresql.org; Thu, 15 May 2025 19:05:18 +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 1uFdrg-00GCL4-4Q for pgsql-bugs@lists.postgresql.org; Thu, 15 May 2025 19:03:32 +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 1uFdrc-0024cw-0t for pgsql-bugs@lists.postgresql.org; Thu, 15 May 2025 19:03:31 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 54FJ3MwV1796925; Thu, 15 May 2025 15:03:22 -0400 From: Tom Lane To: Nathan Bossart cc: jian he , phb.emaj@free.fr, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18923: pg_dump 18beta1 fails to process complex table names In-reply-to: References: <18923-e79273f87c6bed69@postgresql.org> <37115.1747057899@sss.pgh.pa.us> Comments: In-reply-to Nathan Bossart message dated "Thu, 15 May 2025 14:12:41 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12328.1747335801.1@sss.pgh.pa.us> Date: Thu, 15 May 2025 15:03:21 -0400 Message-ID: <12329.1747335801@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Nathan Bossart writes: > I don't think we want to teach appendPGArray() to handle single quotes. No, that seems quite wrong. array_in won't de-dup single quotes. > My first instinct is that we need to build the array with appendPGArray() > and then append it to the query using appendStringLiteralAH(), as done in > the attached patch. Yeah, I think so. I was confused for a bit because the one extant user of appendPGArray is getNamespaces which does an additional layer of quote-doubling via quoteAclUserName. However, that seems to be because it's trying to build aclitem[] arrays whose elements will be read by aclitemin, and that de-dups double quotes. Wouldn't be a bad idea to add a test case. regards, tom lane