From: | "P Kapat" <kap4lin(at)gmail(dot)com> |
---|---|
To: | "George Pavlov" <gpavlov(at)mynewplace(dot)com> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Need suggestion to restructure a database.... |
Date: | 2009-01-01 21:48:06 |
Message-ID: | daef5be80901011348n46ba675tebabfbf7050fa600@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Thanks George:
On 12/31/08, George Pavlov <gpavlov(at)mynewplace(dot)com> wrote:
> Many ways to do it either by creating schemas in the target DBs, or by
> changing search paths (the default one or for the script duration).
> Here's a "one-liner",
> assuming your 4 original databases do not have multiple schemas within
> them:
correct assumption, all of my DBs, have only the public schema
> psql -dmaindb -c"create schema scha"
> pg_dump -Fp -x -O dba | sed 's/SET search_path = public/SET
> search_path = scha/' | psql -dmaindb
Looks simple! After this, would I be able to delete/drop/cascade dba?
--
Regards
PK
--------------------------------------
http://counter.li.org #402424
From | Date | Subject | |
---|---|---|---|
Next Message | Andre Majorel | 2009-01-01 23:45:53 | Upgrade procedure |
Previous Message | George Pavlov | 2009-01-01 01:45:10 | Re: Need suggestion to restructure a database.... |