Re: feature request: pg_restore renaming target schema

Поиск
Список
Период
Сортировка
От CN
Тема Re: feature request: pg_restore renaming target schema
Дата
Msg-id 1450369108.2740801.470182945.59E4E975@webmail.messagingengine.com
обсуждение исходный текст
Ответ на Re: feature request: pg_restore renaming target schema  (John Scalia <jayknowsunix@gmail.com>)
Ответы Re: feature request: pg_restore renaming target schema
Список pgsql-admin
On Thu, Dec 17, 2015, at 11:34 PM, John Scalia wrote:
Maybe a bit off-postgresql, but why couldn't you just add to your existing automations script, Use sed or your favorite stream editor and have that do the renaming in the dump output?
FWIW,
Jay                          or over the web 
 
I thought this approach before I raised this request. I had peeked the dumped file and had a feeling that manipulating the dumped file with stream editors was infeasible because I thought that the source schema name was scrambled everywhere in the dumped file, data included.
 
Having received your message, I started to think that the approach I gave up in the very beginning might actually be the feasible one - thinking that you would not have mentioned it otherwise!
 
Hence I went back and took a more thorough look at the dumped file and happily to find that it *appears* to me that I only need to edit the first several lines of the dumped file in addition to such lines:
 
ALTER FUNCTION <schema name>.my_function(....) OWNER TO ....
 
With that said, the appearance pattern of source schema name in the dumped file seems to be predictable. I will study more to make sure stream editors can do this job.
 
Many thanks for the hint!
 
Best Regards,
CN
-- 
http://www.fastmail.com - The professional email service

В списке pgsql-admin по дате отправления:

Предыдущее
От: John Scalia
Дата:
Сообщение: Re: feature request: pg_restore renaming target schema
Следующее
От: Michał Nowak
Дата:
Сообщение: Re: semop hanging - Postgres 9.4.4