On Sat, 27 Aug 2011 23:41:31 +0200, Bjarne Jensen wrote:
Quote:
I get a "new" database every 4 weeks. They all have the same schema.
I need to find out what changes were done to certain tables from one
issue to the next.
Presently I COPY a table from OLD_db to file and then import it in the
NEW_db where I can compare the tables - like this:
SELECT a,i FROM db_OLD_t WHERE i NOT IN (SELECT i FROM db_NEW_t);
Now, is there some way I can create a (as in 'one') query that can span
2 databases?
/Bjarne |
The dblink extension will help you with that. Essentially, you create
another connection and retrieve the query results. Here is the
documentation:
http://www.postgresql.org/docs/curre...ic/dblink.html
If you don't want that, there is always replication like Slony, which is
simple to set up and works very reliably, at least in my experience.
There is nothing like "select * from emp@dblink" in Postgres.
--
http://mgogala.byethost5.com