pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nagaraj Raj <nagaraj.sf@yahoo.com>
To: pgsql-performance@lists.postgresql.org <pgsql-performance@lists.postgresql.org>
To: Jean-Christophe Boggio <postgresql@thefreecat.org>
Subject: Re: pg_restore schema dump to schema with different name
Date: Mon, 23 Aug 2021 17:54:33 +0000 (UTC)
Message-ID: <543515895.715906.1629741273076@mail.yahoo.com> (raw)
In-Reply-To: <f3d480e2-dbda-83f2-ebbe-2b97e5525e3e@thefreecat.org>
References: <2083887101.547666.1629711847197.ref@mail.yahoo.com>
	<2083887101.547666.1629711847197@mail.yahoo.com>
	<4a3a3b2569bf521a8da585f3f87c8e56c6d19145.camel@cybertec.at>
	<f3d480e2-dbda-83f2-ebbe-2b97e5525e3e@thefreecat.org>

 
Wouldn’t be easy if we have option to_schema ? 
Absolutely, I should not alter current schema, as it live 24/7.
Thanks,Rj    On Monday, August 23, 2021, 06:39:03 AM PDT, Jean-Christophe Boggio <postgresql@thefreecat.org> wrote:  
 
 
> The only way to do that is to create a new database, import the data
> there, rename the schema and dump again.
> 
> Then import that dump into the target database.

Or maybe (if you can afford to have source_schema unavailable for some
time) :

* rename source_schema to tmp_source
* import (that will re-create  source_schema)
* rename source_schema to destination_schema
* rename back tmp_source to source_schema


  

view thread (7+ messages)  latest in thread

Message-ID: <543515895.715906.1629741273076@mail.yahoo.com>
Permalink:  ../543515895.715906.1629741273076@mail.yahoo.com/
Also on:    postgresql.org/message-id/543515895.715906.1629741273076@mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: nagaraj.sf@yahoo.com, pgsql-performance@lists.postgresql.org, postgresql@thefreecat.org
  Subject: Re: pg_restore schema dump to schema with different name
  In-Reply-To: <543515895.715906.1629741273076@mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox