From: | "Miguel Carvalho" <miguel(at)ipatimup(dot)pt> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Select from another database ´....best Way! |
Date: | 2002-02-20 18:42:50 |
Message-ID: | 29320.195.23.103.182.1014230570.squirrel@www.ipatimup.pt |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello,
As far as i know, PostgreSQL doesn't support this feature, so i must do it
by another way.
I need to make a query that will verify if a given element exists in a
table from another database, to implement a foreign key like validation.
The query will be run througth an external script ( PHP ).
A graphical view of the problem:
---------------------------------
( database 1 ) ( database 2 )
--------------- ----------------
| | | |
| TABLE A |<------>| TABLE B |
| | | |
--------------- ----------------
I'd like to hear your opinion on the following solutions:
- Have all the tables( from the 2 databases ) in a unique database, and
use a foreign key constraint.
- Have 2 independent databases. When an insert has to be done, i will
verify if the element exists( other database ). If so i will continue
and commit the transaction. If not i will report the error and
roolback the transaction.
Does PostgreSQL will support this feature soon?
Miguel Carvalho
From | Date | Subject | |
---|---|---|---|
Next Message | Terri Lerose | 2002-02-20 18:45:14 | postgres extensions for bioinformatics |
Previous Message | Jan Wieck | 2002-02-20 18:39:41 | Re: PL/pgSQL RENAME bug? |