pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedCross database foreign keys
4+ messages / 4 participants
[nested] [flat]
* Cross database foreign keys
@ 2001-07-06 13:30 Morgan Curley <mcurley@e4media.com>
0 siblings, 3 replies; 4+ messages in thread
From: Morgan Curley @ 2001-07-06 13:30 UTC (permalink / raw)
To: PostgreSQL-general <pgsql-general@postgresql.org>; pgsql-sql; pgsql-novice@postgresql.org
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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [SQL] Cross database foreign keys
@ 2001-07-06 14:32 Peter Eisentraut <peter_e@gmx.net>
parent: Morgan Curley <mcurley@e4media.com>
2 siblings, 0 replies; 4+ messages in thread
From: Peter Eisentraut @ 2001-07-06 14:32 UTC (permalink / raw)
To: Morgan Curley <mcurley@e4media.com>; +Cc: PostgreSQL-general <pgsql-general@postgresql.org>; pgsql-sql; pgsql-novice@postgresql.org
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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Cross database foreign keys
@ 2001-07-06 14:36 Josh Berkus <josh@agliodbs.com>
parent: Morgan Curley <mcurley@e4media.com>
2 siblings, 0 replies; 4+ messages in thread
From: Josh Berkus @ 2001-07-06 14:36 UTC (permalink / raw)
To: Morgan Curley <mcurley@e4media.com>; +Cc: pgsql-sql
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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Cross database foreign keys
@ 2001-07-06 15:00 Jan Wieck <JanWieck@Yahoo.com>
parent: Morgan Curley <mcurley@e4media.com>
2 siblings, 0 replies; 4+ messages in thread
From: Jan Wieck @ 2001-07-06 15:00 UTC (permalink / raw)
To: Morgan Curley <mcurley@e4media.com>; +Cc: PostgreSQL-general <pgsql-general@postgresql.org>; pgsql-sql; pgsql-novice@postgresql.org
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
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2001-07-06 15:00 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-07-06 13:30 Cross database foreign keys Morgan Curley <mcurley@e4media.com>
2001-07-06 14:32 ` Peter Eisentraut <peter_e@gmx.net>
2001-07-06 14:36 ` Josh Berkus <josh@agliodbs.com>
2001-07-06 15:00 ` Jan Wieck <JanWieck@Yahoo.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