From mcurley@e4media.com Fri Jul 6 13:30:05 2001 Received: from victoria.host4u.net (victoria.host4u.net [216.71.64.77]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f66DU5a58288; Fri, 6 Jul 2001 09:30:05 -0400 (EDT) (envelope-from mcurley@e4media.com) Received: from morganc.e4media.com (adsl-162-83-164-191.nyc.adsl.bellatlantic.net [162.83.164.191]) by victoria.host4u.net (8.8.5/8.8.5) with ESMTP id IAA26556; Fri, 6 Jul 2001 08:14:51 -0500 Message-Id: <4.3.2.7.2.20010706092504.023823b8@e4media.com> X-Sender: mcurley@e4media.com X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Fri, 06 Jul 2001 09:30:02 -0400 To: "PostgreSQL-general" , pgsql-sql@postgresql.org, pgsql-novice@postgresql.org From: Morgan Curley Subject: Cross database foreign keys In-Reply-To: <000a01c10618$ca7f0bb0$c901a8c0@automatic100> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=====================_126880754==_.ALT" X-Archive-Number: 200107/164 X-Sequence-Number: 12079 --=====================_126880754==_.ALT Content-Type: text/plain; charset="us-ascii"; format=flowed 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. Thanks, Morgan --=====================_126880754==_.ALT Content-Type: text/html; charset="us-ascii" 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.

Thanks,
Morgan 

--=====================_126880754==_.ALT-- From peter_e@gmx.net Fri Jul 6 14:30:45 2001 Received: from mailout00.sul.t-online.de (mailout00.sul.t-online.com [194.25.134.16]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f66EUja89604; Fri, 6 Jul 2001 10:30:45 -0400 (EDT) (envelope-from peter_e@gmx.net) Received: from fwd01.sul.t-online.de by mailout00.sul.t-online.de with smtp id 15IWcw-0002yR-0A; Fri, 06 Jul 2001 16:30:38 +0200 Received: from peter.localdomain (520083510237-0001@[217.80.146.71]) by fmrl01.sul.t-online.com with esmtp id 15IWcn-1YszNgC; Fri, 6 Jul 2001 16:30:29 +0200 Date: Fri, 6 Jul 2001 16:32:54 +0200 (CEST) From: Peter Eisentraut To: Morgan Curley cc: PostgreSQL-general , , Subject: Re: [SQL] Cross database foreign keys In-Reply-To: <4.3.2.7.2.20010706092504.023823b8@e4media.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Sender: 520083510237-0001@t-dialin.net X-Archive-Number: 200107/167 X-Sequence-Number: 12082 Morgan Curley writes: > 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. Not possible -- Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter From josh@agliodbs.com Fri Jul 6 14:36:16 2001 Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f66EaGa92365 for ; Fri, 6 Jul 2001 10:36:16 -0400 (EDT) (envelope-from josh@agliodbs.com) Received: from [209.10.40.250] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.4.1) with HTTP id 81678; Fri, 06 Jul 2001 07:36:10 -0700 From: "Josh Berkus" Subject: Re: Cross database foreign keys To: Morgan Curley Cc: pgsql-sql@postgresql.org X-Mailer: CommuniGate Pro Web Mailer v.3.4.1 Date: Fri, 06 Jul 2001 07:36:10 -0700 Message-ID: In-Reply-To: <4.3.2.7.2.20010706092504.023823b8@e4media.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="_===81678====davinci.ethosmedia.com===_" X-Archive-Number: 200107/63 X-Sequence-Number: 3844 This is a multi-part MIME message --_===81678====davinci.ethosmedia.com===_ Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Morgan, > 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. Currently Postgres does not support any SQL operations between databases. It may someday in the future, but then again it may not (it's a design philosophy issue, I believe). I don't know of *any* RDBMS that allows foriegn keys between databases! If referential integrity is your goal, why on earth is the related data in two different databases? -Josh Berkus ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco --_===81678====davinci.ethosmedia.com===_ Content-Type: text/plain Content-Disposition: attachment; filename="" Content-Transfer-Encoding: base64 DQo= --_===81678====davinci.ethosmedia.com===_ Content-Type: text/plain Content-Disposition: attachment; filename="" Content-Transfer-Encoding: base64 DQo= --_===81678====davinci.ethosmedia.com===_ Content-Type: text/plain Content-Disposition: attachment; filename="" Content-Transfer-Encoding: base64 DQo= --_===81678====davinci.ethosmedia.com===_-- From JanWieck@Yahoo.com Fri Jul 6 14:53:37 2001 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