Re: Foreign key from another database

Поиск
Список
Период
Сортировка
От CoL
Тема Re: Foreign key from another database
Дата
Msg-id b6ib16$1v9t$1@news.hub.org
обсуждение исходный текст
Ответ на Foreign key from another database  (antti.ijas@arcada.fi (Antti Ijäs))
Список pgsql-sql
Use trigger on Client after delete, and dblink from contrib.

C.

Antti Ijäs wrote, On 4/3/2003 11:16 AM:
> Hi,
>
> Can I have a reference (with cascading), to another database? Let me
> try to explain the situation a little better ;-)
>
> I have a "main" database, clients. Then I have another database. Let's
> call that program1. In program1 I have a table pTable and in clients I
> have a table namned Client. Like this:
>
> \c clients
> CREATE TABLE Client (
> CustId Serial PRIMARY KEY,
> .....
> );
>
> \c program1
> CREATE TABLE pTable (
> pId SERIAL PRIMARY KEY,
> CustId INTEGER,
> .....
> );
>
> I would like the data to be dropped in pTable automatically, when the
> client is deleted....
>
> / Antti



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

Предыдущее
От: sylfanie@club-internet.fr (Stephane)
Дата:
Сообщение: Re: Difficult query (for me)
Следующее
От: "David Olbersen"
Дата:
Сообщение: Re: Difficult query (for me)