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_j...@mail.gmail.com
v15-0001-make-pg_restore-file-option-using-connect-for.no-cfbot
Description: Binary data