Hi Rusty,
In which case can you not include the text around the schema & table creation
commands to ensure other instances of "public" do not match the string?
I'm not sure exactly what the pg_dump output contains, but you could use
something like:
cat pg_dump.sql | sed 's/CREATE SCHEMA "publi
Hi Brent,
It's not he best solution, because we could have fields containing
"public" in their names and sed would happily change those to test1 as
well.
I'm looking for a safer solution, thats why it should be a part of
pg_dump.
Rusty
On Apr 5, 2008, at 12:41 AM, Brent Wood wrote:
H
Hi Rusty,
Try passing the output through a utility like sed, already there under Linux ,
but versions that work under Windows are available (eg, cygwin)
eg, using a pipe: pg_dump -d | sed 's/public/test1/g' > dump.sql
or converting a pg_dump output file:
pg_dump
cat dump.sql | se
Hi All,
Is there a way to pass a parameter to pg_dump that would make the
produced dump be loaded into a different schema rather then the one it
is being dumped from? Basically be able to say dump out of public,
but write the dump so its restored to say "test1".
Thanks,
Rusty
--
Rusty C