Received: from castle-smtp (firewall-user@ns2.amgen.com [138.133.17.7]) by hub.org (8.9.3/8.9.3) with ESMTP id NAA71521 for ; Thu, 2 Dec 1999 13:02:33 -0500 (EST) (envelope-from mdalphin@amgen.com) Received: by castle-smtp; id KAA26305; Thu, 2 Dec 1999 10:03:04 -0800 (PST) Received: from mailbag.amgen.com(138.133.10.78) by castle-smtp.amgen.com via smap (V4.2) id xma026207; Thu, 2 Dec 99 10:02:07 -0800 Received: from maat.amgen.com (maat [138.133.145.25]) by mailbag.amgen.com (8.8.5/8.8.5) with ESMTP id KAA11315 for ; Thu, 2 Dec 1999 10:01:32 -0800 (PST) Received: from amgen.com (mahunui [138.133.147.23]) by maat.amgen.com (8.8.8+Sun/8.8.8) with ESMTP id KAA00770 for ; Thu, 2 Dec 1999 10:01:31 -0800 (PST) Sender: mdalphin@amgen.com Message-ID: <3846B461.4A346A92@amgen.com> Date: Thu, 02 Dec 1999 10:03:14 -0800 From: Mark Dalphin Organization: Amgen, Inc. X-Mailer: Mozilla 4.6C-SGI [en] (X11; U; IRIX64 6.5 IP30) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: Re: [INTERFACES] Data Migration Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I would find this kind of extension extremely useful! Databases proliferate here at an unbelievable rate; and then, 3 months later, someone needs to "join across the DBs". To do this across DBMS, as suggested below, sounds difficult, but then, I'm not writing the code... Mark > > On Wed, 1 Dec 1999, Tom Lane wrote: > > > No; in Postgres, different databases are different universes ... and > > > there are no wormholes in SQL ;-). > > > > Does SQL92 say no wormholes? Is it a major pain to code this? I've got > > no complaints as I can see ways to do it from the application level. > > I don't know what SQL92 says and. like you, I have easy ways to do this > at the app level but for what it's worth, here's a suggested syntax > for this in case someone want to implement it. > > OPEN DATABASE [AS ] [HOST host] [PORT port] [TYPE ] > > And use it as > > OPEN DATABASE db1 HOST 'other.what.com'; > SELECT * FROM mytab, db1.othertab yourtab > WHERE mytab.f1 = yourtab.f1; > > or > > SELECT mytab.f1, db1.yourtab.f2, ... > > The TYPE attribute allows for opening other databases such as Oracle, etc. > -- Mark Dalphin email: mdalphin@amgen.com Mail Stop: 29-2-A phone: +1-805-447-4951 (work) One Amgen Center Drive +1-805-375-0680 (home) Thousand Oaks, CA 91320 fax: +1-805-499-9955 (work)