Foreign key from another database

Поиск
Список
Период
Сортировка
От antti.ijas@arcada.fi (Antti Ijäs)
Тема Foreign key from another database
Дата
Msg-id 42ee0b8a.0304030116.68199b0c@posting.google.com
обсуждение исходный текст
Ответы Re: Foreign key from another database  (Joe Conway <mail@joeconway.com>)
Re: Foreign key from another database  (Rod Taylor <rbt@rbt.ca>)
Re: Foreign key from another database  (CoL <col@mportal.hu>)
Список pgsql-sql
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 по дате отправления:

Предыдущее
От: Walter McGinnis
Дата:
Сообщение: pesky plpgsql
Следующее
От: Mike Papper
Дата:
Сообщение: Finding if a temp table exists in the current connection