From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: jian he <jian.universality@gmail.com>
Cc: phb.emaj@free.fr
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18923: pg_dump 18beta1 fails to process complex table names
Date: Thu, 15 May 2025 15:03:21 -0400
Message-ID: <12329.1747335801@sss.pgh.pa.us> (raw)
In-Reply-To: <aCYumTym-wLvDFp8@nathan>
References: <18923-e79273f87c6bed69@postgresql.org>
<37115.1747057899@sss.pgh.pa.us>
<CACJufxFLUsXw2tsTLLvWSeO0cX=Wp+fnL-vKK7eiVu0=GSSnRA@mail.gmail.com>
<aCYumTym-wLvDFp8@nathan>
Nathan Bossart <nathandbossart@gmail.com> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, nathandbossart@gmail.com, jian.universality@gmail.com, 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: <12329.1747335801@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox