pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christophe Dore <c.dore@castsoftware.com>
To: Francisco Reyes <lists@stringsutils.com>
To: Julio Leyva <jcleyva@hotmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: pg_restore : change schema
Date: Fri, 2 Apr 2010 08:03:25 +0200
Message-ID: <30B673D7B5844B4394E188D9FFAEF0990160F9E7@mx01.corp.castsoftware.com> (raw)
In-Reply-To: <cone.1270153201.465631.18171.1000@shelca>
References: <30B673D7B5844B4394E188D9FFAEF0990160F94B@mx01.corp.castsoftware.com>
	<cone.1270134403.614462.18171.1000@shelca>
	<BLU102-W1C77366E9295420E963ADA11D0@phx.gbl>
	<cone.1270153201.465631.18171.1000@shelca>

Well, that would work if the schema, when restored, is free. If not, you'd like to set the schema name in which you restore before restoring.

When you use Oracle, you can, using exp/imp, change the schema you restore in by setting properly the program arguments. I understand that this is not possible with postgres, and this would be a nice feature.

Regards

--

Christophe Doré

-----Original Message-----
From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Francisco Reyes
Sent: jeudi 1 avril 2010 22:20
To: Julio Leyva
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] pg_restore : change schema

Julio Leyva writes:

> What about  alter schema  ?

How would that help?

If I understand correctly, the original poster is trying to do something 
like:

Source DB
schema1.table1

And restore it to
schema2.table1

-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (4+ messages)

Message-ID: <30B673D7B5844B4394E188D9FFAEF0990160F9E7@mx01.corp.castsoftware.com>
Permalink:  ../30B673D7B5844B4394E188D9FFAEF0990160F9E7@mx01.corp.castsoftware.com/
Also on:    postgresql.org/message-id/30B673D7B5844B4394E188D9FFAEF0990160F9E7@mx01.corp.castsoftware.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: c.dore@castsoftware.com, lists@stringsutils.com, jcleyva@hotmail.com
  Subject: Re: pg_restore : change schema
  In-Reply-To: <30B673D7B5844B4394E188D9FFAEF0990160F9E7@mx01.corp.castsoftware.com>
  References: <30B673D7B5844B4394E188D9FFAEF0990160F94B@mx01.corp.castsoftware.com> <cone.1270134403.614462.18171.1000@shelca> <BLU102-W1C77366E9295420E963ADA11D0@phx.gbl> <cone.1270153201.465631.18171.1000@shelca> <30B673D7B5844B4394E188D9FFAEF0990160F9E7@mx01.corp.castsoftware.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