Reading a table in a database from another database

From: "Steve SAUTETNER" <ssa(at)informactis(dot)com>
To: "Pgsql-General" <pgsql-general(at)postgresql(dot)org>
Subject: Reading a table in a database from another database
Date: 2001-08-13 07:45:09
Message-ID: BKEHJDOFOAHJBCOBCHJGEEBDCDAA.ssa@informactis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello !

I did exposed my problem, but i didn't expose it correctly :

I have 2 databases, here is the script :

\c template1
create database users;
\c users

create table users_info
(
id int4 primary key,
name varchar(30),
...
);

\c template1
create database products;
\c products

create table products_info
(
id int4 primary key,
id_owner int4,
lib varchar(30),
unitprice numeric(13,2),
...
);

I must define, in the database products, the products_info.id_owner
attribute as a foreign key of the attribute users_info.id in the database
users.

I can't merge the 2 databases. (These are very big, and much tables have the
same name).

Thanks for your help.

Browse pgsql-general by date

  From Date Subject
Next Message Tomáš Kubiš 2001-08-13 08:07:29 posix_getpwnam
Previous Message Mathew Frank 2001-08-13 07:12:20 RE: Re: Bug#108286: case sensitivity in column names