Re: Cross database foreign keys

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Morgan Curley <mcurley(at)e4media(dot)com>
Cc: PostgreSQL-general <pgsql-general(at)postgresql(dot)org>, pgsql-sql(at)postgresql(dot)org, pgsql-novice(at)postgresql(dot)org
Subject: Re: Cross database foreign keys
Date: 2001-07-06 15:00:14
Message-ID: 200107061500.f66F0EO30158@jupiter.us.greatbridge.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice pgsql-sql

Morgan Curley wrote:
> Does anyone know if it is possible to connect to a differernt db from
> within a plsql function.
> I have multilple inter-related schemas and want to enforce some fk
> relationships.

PL/pgSQL doesn't support external database connects. PL/TclU
does.

But keep in mind that with this kind of setup you don't have
two phase commits, and that updates done through such a
trigger (e.g. cascades) will not rollback if your local
update does so after it got fired, because you have to commit
the remote transaction before you know if your local one ever
will.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Philip Molter 2001-07-06 15:12:31 HUPing a database
Previous Message Spiros Ioannou 2001-07-06 14:55:48 postgres slower than grep?

Browse pgsql-novice by date

  From Date Subject
Next Message Perry The Cynic 2001-07-07 07:14:07 Confused about rights
Previous Message Josh Berkus 2001-07-06 14:36:10 Re: Cross database foreign keys

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Eisentraut 2001-07-06 15:10:15 Re: finding current oid
Previous Message Josh Berkus 2001-07-06 14:36:10 Re: Cross database foreign keys