From: | darcy(at)druid(dot)net (D'Arcy J(dot)M(dot) Cain) |
---|---|
To: | guard <guard(at)ficnet(dot)net> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Distributed database ? |
Date: | 2001-01-19 14:01:33 |
Message-ID: | m14Jc6f-000AYOC@druid.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Thus spake guard
> how to run "select from databaseA:tabl1 ,databaseB:table2 "
You can't. You have to have two databases open and do it yourself. I use
Python and often do things like this.
import pg
adb = pg.DB('dbase_a')
bdb = pg.DB('dbase_b')
row = adb.get('table_a', 1) # second argument references primary key
# of table_a in database_a
bdb.get('table_b', row) # one of the fields in row is the primary
# key of table_b in database_b
This assumes that the field names are consistent between databases otherwise
you have to add an extra assignment in but that's the basic idea. Similar
ways exist in other interfaces.
--
D'Arcy J.M. Cain <darcy(at){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.
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Elphick | 2001-01-19 14:56:30 | Re: Where can i get Pgaccess |
Previous Message | Ramesh H R | 2001-01-19 13:42:12 | Where can i get Pgaccess |