Cross database queries

From: postgresql(at)bryden(dot)co(dot)za
To: pgsql-general(at)postgresql(dot)org
Subject: Cross database queries
Date: 2005-08-09 14:21:09
Message-ID: 35283.127.0.0.1.1123597269.squirrel@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

Suppose I have two databases on one server (lets call them DB_A and DB_B)
and I was to write a cross database query. How do I do this in PostgreSQL?

On MS-SQL I would do something like:

SELECT ta.Field1, ta.Field2, tb.Field2
FROM DB_A.dbo.SomeTable ta
JOIN DB_B.dbo.SomeOtherTable tb
ON ta.Field1 = tb.Field1

Thanks
Craig

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Csaba Nagy 2005-08-09 14:25:30 Re: Query stucked in pg_stat_activity
Previous Message Robert Creager 2005-08-09 14:13:26 PostgreSQL and ClearQuest?