Tags: access, concept, database, indifferent, link, mysql, oracle, postgresql, sql, table

Database Link between 2 PostgreSQL db

On Database » PostgreSQL

3,153 words with 1 Comments; publish: Sat, 24 May 2008 12:36:00 GMT; (25076.17, « »)

Hello,

Oracle has a concept of Database link, IE you can access data from a table i

n

different database, even if the database is in different host, using

something like

SELECT * FROM table.postgresql.todaysummary.com.REMOTE_CONNECT;

Is there something similar in PostgreSQL? I would like to know if I can acce

ss

my data on a remote PostgreSQL server from a local PostgreSQL database.

Thank you in advance for any respond.

RDB

--

Reuben D. Budiardja

Dept. Physics and Astronomy

University of Tennesse, Knoxville, TN

--BEGIN GEEK CODE BLOCK--

Version: 3.12

GIT/M/MU/P/S d-(++) s: a-- C++(+++) UL++++ P-- L+++>++++ E- W+++

N+ o? K- w-- !O M- V? !PS !PE Y PGP- t+ 5 X R- tv+

b++>+++ DI D(+) G e++>++++ h+(*) r++ y->++++

--END GEEK CODE BLOCK--

--(end of broadcast)--

TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

All Comments

Leave a comment...

  • 1 Comments
    • On Sat, 2005-03-12 at 15:00 -0500, Reuben D. Budiardja wrote:

      > Hello,

      > Oracle has a concept of Database link, IE you can access data from a table

      in

      > different database, even if the database is in different host, using

      > something like

      > SELECT * FROM table.postgresql.todaysummary.com.REMOTE_CONNECT;

      > Is there something similar in PostgreSQL? I would like to know if I can ac

      cess

      > my data on a remote PostgreSQL server from a local PostgreSQL database.

      > Thank you in advance for any respond.

      > RDB

      You can use dblink.

      > dblink - Functions to return results from a remote database

      >

      http://www.postgresql.org/docs/curr...xpressions.html

      example:

      > SELECT *

      > FROM dblink('dbname=mydb', 'select proname, prosrc from pg_proc')

      > AS t1(proname name, prosrc text)

      > WHERE proname LIKE 'bytea%';

      >

      Cheers,

      Robby

      /***************************************

      * Robby Russell | Owner.Developer.Geek

      * PLANET ARGON | www.planetargon.com

      * Portland, OR | robby.postgresql.todaysummary.com.planetargon.com

      * 503.351.4730 | blog.planetargon.com

      * PHP-PostgreSQL Hosting & Development

      * Open Source solutions - web hosting

      ****************************************

      /

      --(end of broadcast)--

      TIP 4: Don't 'kill -9' the postmaster

      #1; Sat, 24 May 2008 12:38:00 GMT