Re: Non-text mode for pg_dumpall

jian he <jian.universality@gmail.com>

From: jian he <jian.universality@gmail.com>
To: Mahendra Singh Thalor <mahi6run@gmail.com>
Cc: Srinath Reddy <srinath2133@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2025-01-29T09:38:36Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add non-text output formats to pg_dumpall

  2. Improve pg_dump/pg_dumpall help synopses and terminology

  3. Non text modes for pg_dumpall, correspondingly change pg_restore

  4. Doc: manually break lines in wide UUID examples.

Attachments

hi.

we need to escape the semicolon within the single quotes or double quotes.
I think my patch in [1] is correct.

we can have "ERROR:  role "z" already exists
but
error message like
pg_restore: error: could not execute query: "ERROR:  unterminated
quoted string at or near "';
should not be accepted in execute_global_sql_commands, ReadOneStatement, PQexec

attached is the all the corner test case i come up with against
ReadOneStatement.
your v13 will generate errors like "ERROR:  unterminated quoted string
at or near ..."',
which is not good, i think.

[1] https://www.postgresql.org/message-id/CACJufxEQUcjBocKJQ0Amf3AfiS9wFB7zYSHrj1qqD_oWeaJoGQ%40mail.gmail.com