Reading a table in a database from another database

Поиск
Список
Период
Сортировка
От Steve SAUTETNER
Тема Reading a table in a database from another database
Дата
Msg-id BKEHJDOFOAHJBCOBCHJGEEBDCDAA.ssa@informactis.com
обсуждение исходный текст
Список 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.


В списке pgsql-general по дате отправления:

Предыдущее
От: Christopher Zach
Дата:
Сообщение: Re: Using oids for fast read-only access?
Следующее
От: "Tomáš Kubiš"
Дата:
Сообщение: posix_getpwnam