From: | jian he <jian(dot)universality(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Nathan Bossart <nathandbossart(at)gmail(dot)com>, phb(dot)emaj(at)free(dot)fr, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #18923: pg_dump 18beta1 fails to process complex table names |
Date: | 2025-05-16 14:50:42 |
Message-ID: | CACJufxF-dNsCSP-GXXZkKdKebwNKk3+3+RiQ94ir-RSn-331ug@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Fri, May 16, 2025 at 3:03 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> 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.
>
getNamespaces use appendPGArray for object's initial ACL string
getNamespaces
``
nsinfo[i].dacl.initprivs = pstrdup(aclarray->data);
``
and we seems *only* use it dumpACL->buildACLCommands
``
if (!parsePGArray(baseacls, &baseitems, &nbaseitems))
{
free(aclitems);
free(baseitems);
return false;
}
``
parsePGArray didn't handle single-quotes.
I think the above is the reason single-quotes within array elements didn't cause
trouble.
From | Date | Subject | |
---|---|---|---|
Next Message | Manav Kumar | 2025-05-17 12:35:00 | Understanding JDBC Behaviour |
Previous Message | Tom Lane | 2025-05-16 12:51:43 | Re: Postgres: Queries are too slow after upgrading to PG17 from PG15 |