Search Postgresql Archives

Re: question on plain pg_dump file usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 17, 2024 at 8:22 AM Zwettler Markus (OIZ) <Markus.Zwettler@xxxxxxxxxx> wrote:

pg_dump -F p -f dump.sql …

sed -i "s/old_name/new_name/g"

psql -f dump.sql …


Why not rename afterwards? Just "pg_dump mydb | psql -h newhost -f -" and rename things via ALTER. Certainly much safer than a global replace via sed.

Cheers,
Greg 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux