Re: Cross database reference (databases are on the same database cluster) - Mailing list pgsql-general

From Flower Sun
Subject Re: Cross database reference (databases are on the same database cluster)
Date
Msg-id 20030408212534.27159.qmail@web14609.mail.yahoo.com
Whole thread Raw
In response to Re: Cross database reference (databases are on the same  ("scott.marlowe" <scott.marlowe@ihs.com>)
Responses Re: Cross database reference (databases are on the same  ("scott.marlowe" <scott.marlowe@ihs.com>)
List pgsql-general

Hi, Scott,

Thank you for your reply. Can you give us a sample of using the first method using dblink?

(My postgresql server is 7.2 preinstalled while installing redhat 8.0, I even cannot find the */contrib/* directory you mentioned).

 "scott.marlowe" <scott.marlowe@ihs.com> wrote:

On Tue, 8 Apr 2003, Flower Sun wrote:

>
> Hi, group,
>
> I didn't find a syntax for:
>
> select * from database1.tablename; -- while I am login in database2.
>
> Note: database1 and database2 are on one server (one database cluster).

There are two ways to do what you want. One is the use dblink in the
contrib directory, which will let you basically do this.

the other is to move your two databases into one database with seperate
schemas, which is the preferred method and will usually result in much
faster queries.

Note that schema support is relatively new (came out in 7.3) so you might
have to update your postgrsql server to use them, but they are well worth
the effort of upgrading to have.



Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more

pgsql-general by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: The mail nttp gateway is still broken
Next
From: "scott.marlowe"
Date:
Subject: Re: Cross database reference (databases are on the same