X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 24DBBD1CA6C for ; Fri, 9 Apr 2004 22:28:37 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 21159-03 for ; Fri, 9 Apr 2004 22:28:38 -0300 (ADT) Received: from mail1.ihs.com (mail1.ihs.com [170.207.70.222]) by svr1.postgresql.org (Postfix) with ESMTP id AB97DD1E176 for ; Fri, 9 Apr 2004 22:28:31 -0300 (ADT) Received: from css120.ihs.com (css120.ihs.com [170.207.105.120]) by mail1.ihs.com (8.12.10/8.12.10) with ESMTP id i3A1OA1p024855; Fri, 9 Apr 2004 19:24:11 -0600 (MDT) Date: Fri, 9 Apr 2004 19:23:51 -0600 (MDT) From: "scott.marlowe" To: yek ching Cc: Subject: Re: pgsql multi-database queries In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IHS-MailScanner: Found to be clean X-IHS-MailScanner-SpamCheck: X-IHS-MailScanner-Envelope-Sender: scott.marlowe@ihs.com X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/87 X-Sequence-Number: 17462 On Thu, 8 Apr 2004, yek ching wrote: > Dear Sir/Miss, > > Is there a way to do a multi-database select query??.. I fail to find the > related solution... currently i i created seperate table call stockmaster > under seperate database for each seperate organizations... When i want to > queries out the stock item qty for multi database, i face a problem where > sql only can work for single database.. > > How can i use the same SQL statement in Pgsql??.. > "SELECT * FROM A.stockmaster,B.stockmaster where A.item=B.item" Look in the contrib/dblink directory in the source tar ball.