Re: Cross database foreign key workaround?

From: Nagib Abi Fadel <nagib_postgres(at)yahoo(dot)com>
To: David Busby <busby(at)pnts(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Cross database foreign key workaround?
Date: 2003-10-09 06:42:19
Message-ID: 20031009064219.79928.qmail@web21408.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


You can try to use dblink (function returning results
from a remote database)and create some triggers with
it in order to make remote referential integrity.

Or if there's a lot of links between the tables in the
2 databases it may be better to use one database.

--- David Busby <busby(at)pnts(dot)com> wrote:
> List,
> What are the recommended work arounds for cross
> database foreign keys?
> As I understand it transactions are not atomic with
> the TCL method. I have
> a situation that requires a master database and then
> a separate database for
> every subscriber. Subscribers need read/write to
> both databases. I chose
> separate databases because there are 20+ large
> tables that would require
> uid/gid columns, indexes and where conditions to
> separate information by
> subscriber. I thought that was too much overhead.
> Should I just use my
> application to make changes and ensure references
> that need to take place
> across databases? Or should I add a uid/gid to all
> necessary tables, create
> indexes and update all necessary where clauses?
> Ideas?
>
> /B
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose
> an index scan if your
> joining column's datatypes do not match

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Shridhar Daithankar 2003-10-09 06:42:24 Re: Humor me: Postgresql vs. MySql (esp. licensing)
Previous Message Karel Zak 2003-10-09 06:16:02 Re: Humor me: Postgresql vs. MySql (esp. licensing)