Re: Need suggestion to restructure a database.... - Mailing list pgsql-novice

From P Kapat
Subject Re: Need suggestion to restructure a database....
Date
Msg-id daef5be80901011348n46ba675tebabfbf7050fa600@mail.gmail.com
Whole thread Raw
In response to Re: Need suggestion to restructure a database....  ("George Pavlov" <gpavlov@mynewplace.com>)
List pgsql-novice
Thanks George:

On 12/31/08, George Pavlov <gpavlov@mynewplace.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

pgsql-novice by date:

Previous
From: "George Pavlov"
Date:
Subject: Re: Need suggestion to restructure a database....
Next
From: Andre Majorel
Date:
Subject: Upgrade procedure