Re: Cross database foreign keys - Mailing list pgsql-general

From Jan Wieck
Subject Re: Cross database foreign keys
Date
Msg-id 200107061500.f66F0EO30158@jupiter.us.greatbridge.com
Whole thread Raw
In response to Cross database foreign keys  (Morgan Curley <mcurley@e4media.com>)
List pgsql-general
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@Yahoo.com #



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


pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Transactions within a function
Next
From: Philip Molter
Date:
Subject: HUPing a database