Received: from smtp013.mail.yahoo.com (smtp013.mail.yahoo.com [216.136.173.57]) by postgresql.org (8.11.3/8.11.1) with SMTP id f66Erba01396 for ; Fri, 6 Jul 2001 10:53:37 -0400 (EDT) (envelope-from janwieck@yahoo.com) Received: from jupiter.us.greatbridge.com (65.196.69.55) by smtp.mail.vip.sc5.yahoo.com with SMTP; 6 Jul 2001 14:53:31 -0000 X-Apparently-From: Received: (from wieck@localhost) by jupiter.us.greatbridge.com (8.11.2/8.11.2) id f66F0EO30158; Fri, 6 Jul 2001 11:00:14 -0400 From: Jan Wieck Message-Id: <200107061500.f66F0EO30158@jupiter.us.greatbridge.com> Subject: Re: Cross database foreign keys In-Reply-To: <4.3.2.7.2.20010706092504.023823b8@e4media.com> from Morgan Curley at "Jul 6, 2001 09:30:02 am" To: Morgan Curley Date: Fri, 6 Jul 2001 11:00:14 -0400 (EDT) CC: PostgreSQL-general , pgsql-sql@postgresql.org, pgsql-novice@postgresql.org X-Mailer: ELM [version 2.4ME+ PL68 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archive-Number: 200107/169 X-Sequence-Number: 12086 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