Re: BUG #18923: pg_dump 18beta1 fails to process complex table names

jian he <jian.universality@gmail.com>

From: jian he <jian.universality@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: phb.emaj@free.fr, pgsql-bugs@lists.postgresql.org
Date: 2025-05-13T11:34:51Z
Lists: pgsql-bugs

Attachments

On Mon, May 12, 2025 at 9:51 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> PG Bug reporting form <noreply@postgresql.org> writes:
> > I have just run the E-Maj project regression test suite with PG18 beta1 and
> > found a pg_dump abort when trying to dump a schema prefixed table having a
> > complex name including single quote, double quote and space.
>
> Thanks for the report!  Looks like fetchAttributeStats() is completely
> misguided about the appropriate quoting rules for array elements.
>

re-read ReadArrayToken.
In this context, we need to care about single-quote, double-quotes.
for backslash, we skip it.

appendPGArray can help us handle double quotes,
now we just need to make it also handle single quotes.

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. pg_dump: Fix array literals in fetchAttributeStats().