gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] Fwd: postgresql cross-database query


From: Horst Herb
Subject: Re: [Gnumed-devel] Fwd: postgresql cross-database query
Date: Mon, 05 Aug 2002 10:17:12 +1000
User-agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.1a) Gecko/20020611

Tony Lembke wrote:

I found your website (in fact the page http://www.gnumed.org/progress/database.html) via google when trying to find out how to make a cross-database query with postgresql.
So I write you because maybe you found a work around for that problem :o)

Well let me explain you briefly my problem... I just need to copy data from one db to another one
INSERT INTO db1.table (x, y)
    SELECT x, y
    FROM db2.table

Sorry to have disturb you and thank you in advance for your reply.

It cannot be done from psql directly (yet), as Postgres does not support this yet. However, you can access any number of databases on the client side, f.e. via PyGresQL - simply by creating several connections. The drawback is that the data exchange happens on the client, and not directly on the server (unless you run the client script on the server that is) One could use listen/notify, triggers and a cross-database client "daemon" to automatize this on the server side.

Horst




reply via email to

[Prev in Thread] Current Thread [Next in Thread]