Re: Link tables from different databases

Поиск
Список
Период
Сортировка
От Reece Hart
Тема Re: Link tables from different databases
Дата
Msg-id 1211151765.6875.12.camel@snafu
обсуждение исходный текст
Ответ на Re: Link tables from different databases  (Shane Ambler <pgsql@Sheeky.Biz>)
Список pgsql-general
> I want it so that every operation on db1.table1 (ie. INSERT, UPDATE, DELETE)
> also happens to db2.table2, but similarly I want it that application can do
> those operations on db2.table2 but actually it does it on db1.table1 behind
> the scene.

If the tables could be in the same database but in different schemas,
you should be able to arrange a view in schema2 (called "table2") with
rules that operate on table1 in schema1. See the manual for a discuss of
rules and views.

If you really want these tables in separate *databases* (same machine or
not), then you probably want dblink, a stiff drink, and a long-hard
think about the prudence of such a design.

-Reece

--
Reece Hart, http://harts.net/reece/, GPG:0x25EC91A0


В списке pgsql-general по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: tsearch2 on-demand dictionary loading & using functions in tsearch2
Следующее
От: Klint Gore
Дата:
Сообщение: Re: triggers: dynamic references to fields in NEW and OLD?