Re: Accessing a database form another database

From: Kobus Wolvaardt <kobuswolf(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Accessing a database form another database
Date: 2009-08-10 22:24:48
Message-ID: 3bea3b5f0908101524k32ab4bd6g161ffc6acd790125@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Just a thought, but would it not be possible to add a trigger written in
python that makes a connection to another database and does what it needs
to? I have not done this, but if it is possible it should solve your problem
and one that I have. It should allow updates and selects.

I am sure the docs will tell you how to do perl or python based triggers and
if you can use external modules in them...if you can, it would be a rather
straight forward python app that accesses the GIS tables using a DB
connector (postgres or mysql or what ever).

Since I have not read much (more or less nothing) about triggers I could be
way off base and entirely wrong.

Thanks,
Kobus

2009/8/10 Guy Rouillier <guyr-ml1(at)burntmail(dot)com>

> Bill Thoen wrote:
>
>> I've got some GIS tables that I want to use across several projects and
>> currently I've got each project in a separate database. So say I've got two
>> databases, one for the Spacely Sprookets project and one for the Cogswell
>> Cogs contract, but I want to access my WorldMap tables in my GIS database to
>> make maps for both of these projects. How do I reference a table that's in
>> another database? Or should I organize my PostgreSQL data differently?
>>
>
> You can use dblink for this purpose:
>
>
> http://www.postgresonline.com/journal/index.php?/archives/44-Using-DbLink-to-access-other-PostgreSQL-Databases-and-Servers.html
>
>
> --
> Guy Rouillier
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Shoaib Mir 2009-08-10 23:41:27 Re: NOTICE: there is no transaction in progress
Previous Message Scott Ribe 2009-08-10 22:20:51 Re: libpq