X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9A9055E3F15 for ; Mon, 16 Aug 2004 05:01:49 -0300 (ADT) 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 68223-10 for ; Mon, 16 Aug 2004 08:01:44 +0000 (GMT) Received: from anchor-post-30.mail.demon.net (anchor-post-30.mail.demon.net [194.217.242.88]) by svr1.postgresql.org (Postfix) with ESMTP id 3E5145E46E6 for ; Mon, 16 Aug 2004 05:01:42 -0300 (ADT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-30.mail.demon.net with esmtp (Exim 3.35 #1) id 1BwcQy-000M3S-0U; Mon, 16 Aug 2004 08:01:38 +0000 Received: from [192.168.1.17] (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 35DB518551; Mon, 16 Aug 2004 09:01:29 +0100 (BST) Message-ID: <412069DB.107@archonet.com> Date: Mon, 16 Aug 2004 09:01:31 +0100 From: Richard Huxton User-Agent: Mozilla Thunderbird 0.7 (X11/20040615) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Fabio Ferrero Cc: pgsql-sql@postgresql.org Subject: Re: duplicate table in two databases References: <411B73D0.3080208@inwind.it> In-Reply-To: <411B73D0.3080208@inwind.it> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/142 X-Sequence-Number: 18639 Fabio Ferrero wrote: > I use postgres 7.2.1 (debian woody) and PHP. > > I've two databases (foo and bar for example) with the same table (ie. > stamps). > > It's possible with a single query transfer the data from the stamps > table in db foo to the stamps table in db bar? You might want to look in the contrib/ folder of the source distribution (or the equivalent in your packaged installation for "dblink". Haven't used it myself, but it can certainly do what you want here. -- Richard Huxton Archonet Ltd