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

Re: Creating schema copy

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mariusz Czułada <manieq(at)idea(dot)net(dot)pl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Creating schema copy
Date: 2004-10-28 01:34:03
Message-ID: 26817.1098927243@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-general
Mariusz =?iso-8859-2?q?Czu=B3ada?= <manieq(at)idea(dot)net(dot)pl> writes:
> My question: is it possible to extend (in near future) CREATE SCHEMA syntax 
> with feature like:
> 	CREATE SCHEMA user_xxx_schema FROM default_user_schema [WITH CONTENT];
> ?
> It should create *every* object existing in 'default_user_schema' in 
> 'user_xxx_schema' preserving of course names, constraints, triggers, etc. 
> Optionally it could also copy table contents (but this is not very 
> important).

AFAICS this would require a code body approximately as large,
complicated, and maintenance-needy as pg_dump itself; and being inside
the backend, it could share little or no physical code with pg_dump.

So no, it's not very likely to happen in the near future.  pg_dump is
your best bet.

			regards, tom lane

In response to

pgsql-general by date

Next:From: JoelDate: 2004-10-28 01:35:27
Subject: Re: compatibilityissues from 7.1 to 7.4
Previous:From: Stanislaw TristanDate: 2004-10-28 01:32:21
Subject: View's rule on delete problem

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