pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: "D'Arcy" "J.M." Cain <darcy@druid.net>
To: raanders@altoplanos.net
Cc: tgl@sss.pgh.pa.us
Cc: rob@y2k.state.il.us
Cc: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] Data Migration
Date: Wed, 1 Dec 1999 16:23:29 -0500 (EST)
Message-ID: <m11tHDl-0000cRC@druid.net> (raw)
In-Reply-To: <Pine.LNX.4.04.9912011214040.30244-100000@asgard.altoplanos.net>

Thus spake Roderick A. Anderson
> 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 <dbname> [AS <alias>] [HOST host] [PORT port] [TYPE <db 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.

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.



view thread (9+ messages)  latest in thread

Message-ID: <m11tHDl-0000cRC@druid.net>
Permalink:  ../m11tHDl-0000cRC@druid.net/
Also on:    postgresql.org/message-id/m11tHDl-0000cRC@druid.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: darcy@druid.net, raanders@altoplanos.net, tgl@sss.pgh.pa.us, rob@y2k.state.il.us
  Subject: Re: [INTERFACES] Data Migration
  In-Reply-To: <m11tHDl-0000cRC@druid.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox