From: | Eliot Gable <egable+pgsql-general(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Foreign Tables |
Date: | 2011-11-16 18:38:03 |
Message-ID: | CAD-6L_XFF4au6g-adH79VvDFUXuHzSoverjXGkYRmmU6i=P1qg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I am working on a reporting project where I need to generate a report based
on data from several different network appliances. Each appliance runs a
PostgreSQL database which houses all of the information for the appliance.
Further, there are dozens of triggers in the database which fire when
various tables are touched in various different ways (insert, update,
delete). These triggers currently are used to build materialized views of
much of the data that I want to summarize in the reports.
I have read as much as I can find on 9.1's foreign table support, and it
looks almost ideal for bridging the gap between all the databases and
collecting all the data into a single report. However, I am unclear on a
few points...
1a) Can the foreign tables be written to? For example, I have server1 with
table foo and server2 which does 'create foreign table bar' where bar
references server1.foo. Can server2 write to bar and have it show in
server1.foo?
1b) If it does show in server1.foo, I assume it would also fire any
triggers on server1.foo; correct?
2) Given the example in question #1, can I put a trigger on server2.bar and
have it actually fire when server1.foo has an insert, update, or delete
operation on it?
Thanks in advance for any answers.
--
Eliot Gable
"We do not inherit the Earth from our ancestors: we borrow it from our
children." ~David Brower
"I decided the words were too conservative for me. We're not borrowing from
our children, we're stealing from them--and it's not even considered to be
a crime." ~David Brower
"Esse oportet ut vivas, non vivere ut edas." (Thou shouldst eat to live;
not live to eat.) ~Marcus Tullius Cicero
From | Date | Subject | |
---|---|---|---|
Next Message | Sean Patronis | 2011-11-16 18:48:25 | Re: [BULK] Re: Streaming Replication woes |
Previous Message | Andreas Kretschmer | 2011-11-16 16:30:55 | Re: How could I find the last modified procedure in the database? |