From: CoL <col@mportal.hu>
To: pgsql-sql@postgresql.org
Subject: Re: Foreign key from another database
Date: Fri, 04 Apr 2003 00:09:01 +0200
Message-ID: <b6ib16$1v9t$1@news.hub.org> (raw)
In-Reply-To: <42ee0b8a.0304030116.68199b0c@posting.google.com>
References: <42ee0b8a.0304030116.68199b0c@posting.google.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: col@mportal.hu
Subject: Re: Foreign key from another database
In-Reply-To: <b6ib16$1v9t$1@news.hub.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox