X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B9389D82C0 for ; Fri, 18 Nov 2005 13:33:50 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 60418-09 for ; Fri, 18 Nov 2005 17:33:49 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mx1.surnet.cl (mx1.surnet.cl [216.155.73.180]) by svr1.postgresql.org (Postfix) with ESMTP id D2595DBAC2 for ; Fri, 18 Nov 2005 13:33:47 -0400 (AST) Received: from unknown (HELO cluster.surnet.cl) ([216.155.73.165]) by mx1.surnet.cl with ESMTP; 18 Nov 2005 14:36:04 -0300 X-IronPort-AV: i="3.97,347,1125892800"; d="scan'208"; a="28739400:sNHT39198402" Received: from alvh.no-ip.org (216.155.78.23) by cluster.surnet.cl (7.0.043) (authenticated as alvherre@surnet.cl) id 43501597004C48EA; Fri, 18 Nov 2005 14:33:47 -0300 Received: by alvh.no-ip.org (Postfix, from userid 1000) id DDBDDC2DC19; Fri, 18 Nov 2005 14:34:02 -0300 (CLST) Date: Fri, 18 Nov 2005 14:34:02 -0300 From: Alvaro Herrera To: Mario Splivalo Cc: pgsql-admin@postgresql.org Subject: Re: Diffs between two databases... Message-ID: <20051118173402.GC25868@surnet.cl> Mail-Followup-To: Mario Splivalo , pgsql-admin@postgresql.org References: <1132321646.7965.22.camel@ekim> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1132321646.7965.22.camel@ekim> User-Agent: Mutt/1.5.11 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.77 required=5 tests=[AWL=-0.476, DNS_FROM_RFC_ABUSE=0.479, DNS_FROM_RFC_POST=1.44, RCVD_IN_NJABL_PROXY=0.327] X-Spam-Score: 1.77 X-Spam-Level: * X-Archive-Number: 200511/240 X-Sequence-Number: 19613 Mario Splivalo wrote: > I've seen that I can do pg_dump to a file with pg_dump -Fc, and then I > can do pg_restore -Fc -l to have the list of all the > database objects. There I can see the functions, but how do I (re)create > just the desired function? Use pg_restore -L. > What would suit me the best would be a tool/util that would drop each > db.object into a separate file. Then I could create a script wich will > 'load' each object from the file when I want it (so I don't have > dependency problems). I think you could use the "tar" method (-Ft option to pg_dump) and extract the body of each element from the generated dump. Treat it as a standard tar archive. -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.