From: | CN <cnliou9(at)fastmail(dot)fm> |
---|---|
To: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: feature request: pg_restore renaming target schema |
Date: | 2015-12-17 16:18:28 |
Message-ID: | 1450369108.2740801.470182945.59E4E975@webmail.messagingengine.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Michał Nowak | 2015-12-17 17:21:26 | Re: semop hanging - Postgres 9.4.4 |
Previous Message | John Scalia | 2015-12-17 15:34:12 | Re: feature request: pg_restore renaming target schema |