Re: Foreign Key between different databases

From: Cedar Cox <cedarc(at)visionforisrael(dot)com>
To: Stan van de Mortel <SvdMortel(at)InterPlein(dot)nl>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Foreign Key between different databases
Date: 2001-04-11 08:56:30
Message-ID: Pine.LNX.4.21.0104111152360.28356-100000@nanu.visionforisrael.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


AFAIK, not easily. There was a post to the hackers list recently with
code for a "database connector" function. Using this it may be possible
to write your own referential integrity triggers that reference the other
database.. maybe not. I didn't look much into the code. There might be
something else around somewhere. Note that in order to enforce "full" RI
you will have to write these functions in both databases. Oh, and the
other database does have to be a Postgresql database with the above
mentioned code.

-Cedar

On Tue, 10 Apr 2001, Stan van de Mortel wrote:

> Hello,
>
> I've a table in a database and I want to create a column that is a foreign
> key to a table in an other database. When I try ...,foreign key (x)
> references otherdb.table(x) it says 'parse error at or near "."'.
>
> Is there an other way to create this kind of foreign key?
>
> Stan van de Mortel
> [SvdMortel(at)InterPlein(dot)nl]
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message George Moga 2001-04-11 09:27:21 Re: problem with copy command
Previous Message The Hermit Hacker 2001-04-11 00:58:05 Re: Re: 7.1 out soon?