Foreign key from another database

From: antti(dot)ijas(at)arcada(dot)fi (=?ISO-8859-1?Q?Antti_Ij=E4s?=)
To: pgsql-sql(at)postgresql(dot)org
Subject: Foreign key from another database
Date: 2003-04-03 09:16:40
Message-ID: 42ee0b8a.0304030116.68199b0c@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Marc G. Fournier 2003-04-03 10:12:55 Re: simple trigger question ...
Previous Message Christoph Haller 2003-04-03 08:40:42 Re: Syntax problem!