X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 74464475458 for ; Thu, 3 Apr 2003 04:17:20 -0500 (EST) Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id ADAAD474E44 for ; Thu, 3 Apr 2003 04:17:19 -0500 (EST) Received: by news.hub.org (Postfix, from userid 8) id 4272543A89E; Thu, 3 Apr 2003 04:17:19 -0500 (EST) From: antti.ijas@arcada.fi (=?ISO-8859-1?Q?Antti_Ij=E4s?=) X-Newsgroups: comp.databases.postgresql.sql Subject: Foreign key from another database Date: 3 Apr 2003 01:16:40 -0800 Organization: http://groups.google.com/ Lines: 26 Message-ID: <42ee0b8a.0304030116.68199b0c@posting.google.com> Content-Type: text/plain; charset=ISO-8859-1 X-Complaints-To: groups-abuse@google.com To: pgsql-sql@postgresql.org Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, hits=-5.8 required=5.0 tests=BAYES_10 version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/39 X-Sequence-Number: 12740 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,=20 .... ); I would like the data to be dropped in pTable automatically, when the client is deleted.... / Antti