Re: Linking Tables from 2 databases

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: "Pratik Shukla" <pratikshukla(at)hotmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Linking Tables from 2 databases
Date: 2006-07-20 02:34:19
Message-ID: b42b73150607191934y7b981e4cra44be9d7068dd026@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 7/19/06, Pratik Shukla <pratikshukla(at)hotmail(dot)com> wrote:
> I have created a DB1 with several tables. Now i need to create another DB2
> with a linked table from DB1. So if there is a table_X in DB1, is there a
> way to import that table_X into DB2 so that any changes made to table_X in
> DB1 will also apply to DB2?

that sounds a lot like replication. check out slony. for a slightly
slimper alternative you may consider not using two databases, make two
schemas inside your database. now you can link your tables via simple
trigger. open up the documentation and read up on schemas and make
sure this is not the right solution for you.

> table_X has references to other tables in DB1 as well...will these
> references be maintained if table_X is imported to DB2?

it's not quite clear what your are asking...I don't understand what
your concept of a reference is. if you are replicating, generally you
always make changes to one table and the other is a slave.

merlin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message surabhi.ahuja 2006-07-20 06:05:05 psql seems to hang during delete query
Previous Message Jerry LeVan 2006-07-20 02:22:22 Ann: PyPgExplorer-0.8