How to create database link and synonym in postgresql 9.0 - Mailing list pgsql-general

From tushar nehete
Subject How to create database link and synonym in postgresql 9.0
Date
Msg-id CANuBLQVp1NZ0DsdGpyK+dCBHGFH3Nhpi0DSaUtXiZCbyq2BumA@mail.gmail.com
Whole thread Raw
Responses Re: How to create database link and synonym in postgresql 9.0  (Filip Rembiałkowski <plk.zuber@gmail.com>)
List pgsql-general
Hi,
In one of the migration porject  want to access and update some tables from
other database on same postgresql server.

The question is how to access tables from other database on the same postgres server.
If it is by database link like Oracle then what is the syntax.
And how to create synonym?

Say i have a postgres server on RHEL5 and it has 2 databases db1 and db2.
db2 has table emp which i want to access from db1.
so i create a dblink in oracle named dblnk_emp and access the table in db1 by
select * from emp@dblnk_emp;
so i create synonym for emp@dblnk_emp as emp in db1.


In postgres I can access table from other database by dblink but cannot update it. Also there is
support for synonym.

Please help..


pgsql-general by date:

Previous
From: Filip Rembiałkowski
Date:
Subject: Re: Restoring 2 Tables From All Databases Backup
Next
From: Alexander Farber
Date:
Subject: function "XXX" already exists with same argument types