Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id ABBBB4758D7 for ; Mon, 19 Aug 2002 22:48:28 -0400 (EDT) Received: from imo-r01.mx.aol.com (imo-r01.mx.aol.com [152.163.225.97]) by postgresql.org (Postfix) with ESMTP id E158847582E for ; Mon, 19 Aug 2002 22:48:27 -0400 (EDT) Received: from GBMerrall@aol.com by imo-r01.mx.aol.com (mail_out_v34.9.) id j.e4.2bfb6752 (15900); Mon, 19 Aug 2002 22:48:07 -0400 (EDT) Received: from aol00891 ([10.5.3.200]) by air-id09.mx.aol.com (v87.22) with ESMTP id MAILINID93-0819224806; Mon, 19 Aug 2002 22:48:06 -0400 From: "Graeme Merrall" To: , "Jiaqing" , Subject: Re: how to refer to tables in another database( or schema as oracle refers to) Date: Tue, 20 Aug 2002 12:47:29 +1000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 In-Reply-To: Importance: Normal X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/285 X-Sequence-Number: 9131 > Basically - you can't. There is a program in the contrib/dblink directory > that can help you though. > My take on this dblink program is to create SQL as a view. For example coming from Oracle you might do "SELECT one, two, FROM foo.bar". Convert that to a VIEW called simply "bar" or "foo_bar" that contains your dblink query and there will be minimal chnages you'll have to make to your actual code. This could also be used to get around synonyms as well. Cheers, Graeme