Search Postgresql Archives

Re: How to make a copy of schema

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



am  Sun, dem 15.10.2006, um 19:10:53 +0300 mailte Andrus folgendes:
> I have a five company Postgres 8.1 database.
> 
> Each company data is stored in a different schema named Company1, Company2, 
> ..., Company5
> There is also public schema which contains common data.
> 
> Now customer wants to add sixth company to database.
> 
> In need to add some routine to my application which can create schema copy ?

You can make a pg_dump with option -n Company5, replace in the dump
Company5 with Company6 and restore this.

Or, make the dump, rename schema Company5 to Company6 and restore then
the dump.

Be careful with things like sequences!


Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47215,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux