Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id ADA8D4766EF for ; Mon, 9 Sep 2002 11:50:26 -0400 (EDT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id 28F85476D56 for ; Mon, 9 Sep 2002 11:44:08 -0400 (EDT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 4BD7DD602; Mon, 9 Sep 2002 08:44:09 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 417C85C03; Mon, 9 Sep 2002 08:44:09 -0700 (PDT) Date: Mon, 9 Sep 2002 08:44:09 -0700 (PDT) From: Stephan Szabo To: Jay Cc: Subject: Re: Database joins In-Reply-To: <005101c257df$0343be50$a800a8c0@blraddrcom> Message-ID: <20020909084148.S13345-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/51 X-Sequence-Number: 9328 On Mon, 9 Sep 2002, Jay wrote: > Hi, > I have created two databases, db1 and db2 in my POSTGRESQL database system. > And both the databases contains few tables also. > Could you please help me to write a query which should retrieve data from both the databases > (Database joins and table joins) You cannot currently directly via sql only do cross database joins. You might want to see if contrib/dblink will let you do what you want (iirc it's gotten better in 7.3 with the functions returning result set stuff).