Re: Using tables in other PostGreSQL database

From: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Using tables in other PostGreSQL database
Date: 2008-03-29 22:53:06
Message-ID: 2c32a182-0899-407b-9354-68edd8fa4c20@mm
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Scott Marlowe wrote:

> How do you do cross db access within a transaction?
> You can't, and it's not likely that any code will be put in place to
do this.

But wasn't such code announced in 8.1? From
http://www.postgresql.org/about/news.422 :
"Two-Phase Commit (2PC): Long in demand for WAN applications and
heterogeneous data centers using PostgreSQL, this feature allows
ACID-compliant transactions across widely separated servers."

However I admit I don't know what end-user-level functionality 2PC has
enabled in PG if any. From the announcement one might expect some
equivalent of Oracle's database links, yet obviously we don't have
this.

> Even in Oracle you don't have cross db queries.

On the contrary you do. You can refer to objects in another database by
OBJECT_NAME(at)DBLINK_NAME, very useful to mix local and remote data in no
time. DBLINK_NAME represents a connection to another database.
What you don't have is OTHERDB.OBJECT_NAME to refer to a different
database within the same instance, because there is only one database
in an Oracle instance.

> You use schemas there.

Also there are no real schemas in Oracle, or they're strictly tied from
db users, and that's again quite different from how it's done in PG.

Regards,
--
Daniel
PostgreSQL-powered mail user agent and storage:
http://www.manitou-mail.org

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kevin Hunter 2008-03-30 02:54:16 Re: Connection to PostgreSQL Using Certificate: Wrong Permissions on Private Key File
Previous Message Tom Lane 2008-03-29 19:50:20 Re: Connection to PostgreSQL Using Certificate: Wrong Permissions on Private Key File