Re: Non-text mode for pg_dumpall

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: Mahendra Singh Thalor <mahi6run(at)gmail(dot)com>
Cc: Srinath Reddy <srinath2133(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Non-text mode for pg_dumpall
Date: 2025-02-04 07:42:28
Message-ID: CACJufxHPfwRm6Ssy73vhB6etrW7q4CRuTBmfyHFBH66wwwFe3g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

hi.
This attached patch solves problems mentioned in [1].
so pg_restore --file restoring multiple databases will have the
```\connect dbname``` command in it.
the output plain text file can be used in psql.

pg_restore --file output will be:

--
-- Database "template1" dump
--

-- Dumped from database version 18devel_debug_build_622f678c10
-- Dumped by pg_dump version 18devel_debug_build_622f678c10

-- Started on 2025-02-04 14:34:44 CST

\connect template1

.....

-- Completed on 2025-02-04 14:34:53 CST

--
-- Database "template1" dump complete
--

[1] https://postgr.es/m/CACJufxFrzYJ0oZNm=v9hg10UpPQNe+p0+2ydNirHxyhUT_JtXw@mail.gmail.com

Attachment Content-Type Size
v15-0001-make-pg_restore-file-option-using-connect-for.no-cfbot application/octet-stream 7.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2025-02-04 07:55:03 Re: Show WAL write and fsync stats in pg_stat_io
Previous Message Michael Paquier 2025-02-04 07:03:55 Re: Show WAL write and fsync stats in pg_stat_io