Query two database at once

From: Stéphane RIFF <stephane(dot)riff(at)cerene(dot)fr>
To: pgsql-sql(at)postgresql(dot)org
Subject: Query two database at once
Date: 2005-05-02 15:36:05
Message-ID: 427648E5.6080306@cerene.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

I want to ewecute a query on two database like this :

SELECT * FROM table01 T1, table02 T2 WHERE T1.gid=T2.gid AND
T2.my_field='".$value."'

The problem is that table01 is in a different database than table02 and
i don't know how to telle postgresql
to look in two db.
Is there a solution other than execute two query ?
Thanks

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Sam Adams 2005-05-02 16:30:12 Java and Currval
Previous Message Christoph Haller 2005-05-02 15:20:32 Re: how many tuples on a cursor?