Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id AB60C63714E for ; Tue, 23 Feb 2010 03:31:41 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 54123-03 for ; Tue, 23 Feb 2010 07:31:28 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ww0-f46.google.com (mail-ww0-f46.google.com [74.125.82.46]) by mail.postgresql.org (Postfix) with ESMTP id D3186637149 for ; Tue, 23 Feb 2010 03:31:30 -0400 (AST) Received: by wwf26 with SMTP id 26so614002wwf.19 for ; Mon, 22 Feb 2010 23:31:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=f/qwK+yhN9tw1U2Aw5rGUn7LQhR+tRnuGYu6NlnNmPU=; b=OkJs648TlZ3f3YszAvGOPDxafn+zl4VIwPQBtkeOQfMVwbUp853wAVrgx1B4tLDvBH DgWYkHgYaFAwQcXk3bpOYxZd0FCDIitMUShFHcirFA1FKjgOHTW/yQxV6zW5Sxvx5UnB HhLfl0LHzlD7ivKO2KYTW2iEUnz3TuxxEhAV0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=I2Eud9smTyIeEaOJ7gqwb4KG/PpjQUPhnCwaLHS7/KT8vd06hBXmisOvSwsJMBAAs3 wayKkxIGanoX67YyuqZPx8tLIy5eCYUkky4DLL5yG2o1uKSMU0LLneaNGHKdsSaU0FDM hRFWtMirr8jHB2b2kaEqJK8FpnHKWageeXL1s= MIME-Version: 1.0 Received: by 10.216.157.1 with SMTP id n1mr2559736wek.188.1266910289420; Mon, 22 Feb 2010 23:31:29 -0800 (PST) In-Reply-To: References: <4B836324.7090604@hogranch.com> Date: Tue, 23 Feb 2010 00:31:29 -0700 Message-ID: Subject: Re: how do I do dump and restore without bugging with constraint? From: Scott Marlowe To: "Net Tree Inc." Cc: John R Pierce , pgsql-general@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.405 tagged_above=-10 required=5 tests=AWL=0.194, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201002/972 X-Sequence-Number: 159748 On Mon, Feb 22, 2010 at 11:39 PM, Net Tree Inc. wrot= e: > Ok, I am just trying to find the proper way to back and restore database > that contain restriction. > The other way to ask. If I have two 99% schema=A0similar databases. The o= ld > one might contain few columns that does not exist in the new one and cont= ain > constrains that the new DB does not have. In that case, what's standard t= o > do this? > Since they are 99% similar in schema, can I do "data dump" only ? will th= at > work? > If owner for database between Old and new DB are different, do I must add > that owner in by create new role? > appreciated, What I would do is to dump and restore the db as a whole which will take care of constraint issues. Then I would alter the tables to match the new schema.