pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Foreign Key between different databases
2+ messages / 2 participants
[nested] [flat]

* Foreign Key between different databases
@ 2001-04-10 08:53  Stan van de Mortel <SvdMortel@InterPlein.nl>
  0 siblings, 1 reply; 2+ messages in thread

From: Stan van de Mortel @ 2001-04-10 08:53 UTC (permalink / raw)
  To: pgsql-sql

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@InterPlein.nl]




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Foreign Key between different databases
@ 2001-04-11 08:56  Cedar Cox <cedarc@visionforisrael.com>
  parent: Stan van de Mortel <SvdMortel@InterPlein.nl>
  0 siblings, 0 replies; 2+ messages in thread

From: Cedar Cox @ 2001-04-11 08:56 UTC (permalink / raw)
  To: Stan van de Mortel <SvdMortel@InterPlein.nl>; +Cc: 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@InterPlein.nl]
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
> 




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2001-04-11 08:56 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-04-10 08:53 Foreign Key between different databases Stan van de Mortel <SvdMortel@InterPlein.nl>
2001-04-11 08:56 ` Cedar Cox <cedarc@visionforisrael.com>

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