Re: [HACKERS] pg_dump issues - Mailing list pgsql-hackers

From Дмитрий Воронин
Subject Re: [HACKERS] pg_dump issues
Date
Msg-id 1999271501070187@web36o.yandex.ru
Whole thread Raw
In response to Re: [HACKERS] pg_dump issues  (Victor Drobny <v.drobny@postgrespro.ru>)
List pgsql-hackers
Hello, 

25.07.2017, 11:17, "Victor Drobny" <v.drobny@postgrespro.ru>:
>
> Hello,
>
> Do you expect to have some flag like '--rename=test->test2'?

Yes, I do. 

> Will dump with test replaced by test2(of course only in related places)
> be valid dump in this case?

Yes, it will.

> What is the possible scenario for the renaming option? Is it doing to be
> dumping of the one schema only?
> Or it could be dump of database? In this case pg_dump should also
> support multiple rules for renaming.

pg_dump scans dumped objects and rename them by rules, that could be set by pg_dump argument line options.
As I now, pg_dump and pg_restore use the same functions, so, renaming mechanism can be integrated in pg_restore too.
pg_restore will scan dumped objects and rename them by rules.

In future, rules could be applied on all database objects.

>
> Thank you for attention!
>
> --
> ------
> Victor Drobny
> Postgres Professional: http://www.postgrespro.com
> The Russian Postgres Company

-- 
Best regards, Dmitry Voronin



pgsql-hackers by date:

Previous
From: ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Date:
Subject: Re: [HACKERS] proposal: psql: check env variable PSQL_PAGER
Next
From: Robert Haas
Date:
Subject: Re: [HACKERS] Change in "policy" on dump ordering?