X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.225.181]) by svr1.postgresql.org (Postfix) with ESMTP id B07C7CCDC1 for ; Fri, 18 Jul 2003 21:06:19 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr5.postgresql.org [64.117.225.181]) (amavisd-new, port 10024) with ESMTP id 82885-07 for ; Fri, 18 Jul 2003 21:06:40 +0000 (GMT) Received: from exchange.hq.openratings.com (unknown [141.149.165.226]) by svr1.postgresql.org (Postfix) with ESMTP id 06919CBA17 for ; Fri, 18 Jul 2003 18:06:08 -0300 (ADT) Received: from openratings.com (cancun.hq.openratings.com [10.0.0.225]) by exchange.hq.openratings.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id 38QM40NC; Fri, 18 Jul 2003 17:06:37 -0400 Message-ID: <3F18616E.60407@openratings.com> Date: Fri, 18 Jul 2003 17:06:54 -0400 From: Dmitry Tkach User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Yudie Cc: pgsql-sql@postgresql.org Subject: Re: how to copy table to another database? References: <003101c34d6d$cb199010$8401a8c0@yudie> In-Reply-To: <003101c34d6d$cb199010$8401a8c0@yudie> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/260 X-Sequence-Number: 14374 Yudie wrote: > Hi, > Anyone know how the procedure or commands to copy table to another > database. > or querying from another database if possible? > > thank you > > yudie Something like this, perhaps? psql -d first_database -c '\copy mytable to stdout' | psql -d second_database -c '\copy mytable from stdin' I hope, it helps... Dima