Re: query

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: Federico Balbi <fbalbi(at)cs(dot)utsa(dot)edu>
Cc: postgresql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: query
Date: 2005-09-01 19:22:00
Message-ID: 1125602520.28179.171.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2005-09-01 at 13:34, Federico Balbi wrote:
> Hi,
> I was just wondering if postgresql supports queries between servers in
> order to pull info from different machines.
> Let's say server A can run a query against server B... something like:
>
> server1 running a SELECT * FROM server2.table
>
> or joins
>
> SELECT A.name, B.name FROM server1.table A, server2.table B WHERE A.id=B.id

No, not directly. The two solutions are:

use two schemas, not two db servers, and use that. Then the query would
be the same, but instead of server1 and server2, it would be schema1 and
schema2.

OR

use the dblink module.

the dblink module does NOT allow you to rollback the transaction
entirely, because the transaction semantics across machines aren't there
or in it.

In response to

  • query at 2005-09-01 18:34:41 from Federico Balbi

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2005-09-01 19:23:36 Re: query
Previous Message Steve Crawford 2005-09-01 18:58:00 ODBC and inappropriate select *