Skip site navigation (1) Skip section navigation (2)

Re: Need suggestion to restructure a database....

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 (view raw or flat)
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

In response to

pgsql-novice by date

Next:From: Andre MajorelDate: 2009-01-01 23:45:53
Subject: Upgrade procedure
Previous:From: George PavlovDate: 2009-01-01 01:45:10
Subject: Re: Need suggestion to restructure a database....

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group